What causes the error
Found an unexpected Mach-O header code: 1918975009 in xCode 6
I archived my project to send out as an ad hoc
build and it builds/links/archives just fine but when I'm in the xCode
organizer and select Export -> Ad Hoc
,
I get the error
Found an unexpected Mach-O header code: 191897500.
In my case this issue ("found an unexpected mach-o header code 0x72613c21") appeared after I've installed Crashlytics, Fabric.
Somehow pods appeared to become an embedded binary. So I had to remove it, pod install once more, and the issue disappeared.
I had the same error. In my case it was caused by an universal framework that I accidentally copied into the resources of the app (which is unnecessary, since frameworks get merged directly into the main executable on iOS AFAIK).
So, select your target, click the "Build Phases" tab, and look through the "Copy Bundle Resources" list to see if you copy a library or framework that contains desktop architectures (i386 or x86_64).
Most likely, copying such a file is wrong, but if for some reason you have to, apparently it can only contain iOS compatible architectures.
Had a similar error 1918975009 with the new Swift build system in Xcode 9.3 (under Workspace Settings...) on a third-party framework that was manually added (not using Cocoapods). Maybe related to the above thread so in case it helps anyone... This only appeared after upgrading to Xcode 9.3 after it released officially yesterday. Xcode 9.2 and earlier on the new build system did not throw the warning.
:-1: <path>/Frameworks/<frameworkName>.framework/<frameworkName>: Failed to parse executable: Unknown header: 1918975009
Switching back to the old non-Swift-based build system fixes the issue. Not an optimal solution but if you're seeing a similar warning, will let you move on for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With