Found an unexpected Mach-O header code: 0x72613c21 (Carthage)


If you ended up here, know that this was a tough one 🙂

If you're using Carthage and already cleaned all the embedded frameworks and "Copy Bundle Resources", cleaned the project and removed Derived Data, and none of your verbose logs were helpful, here's what helped me:

It turns out you put only static libraries into your input.xcfilelist and output.xcfilelist files. My problem was that somehow I added there a recent Firebase's dependency - the AppAuth.framework thinking it's neccessary to be stripped down before uploading to the App Store. Turns out its not and removing it from the aforementioned files actually solved the issue.

P.S. This helpful SO post explains how to understand which of your libraries are static and which are dynamic.