Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Found an unexpected Mach-O header code: 1918975009 in xCode 6

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. 
like image 438
rtvanals Avatar asked Oct 25 '14 06:10

rtvanals


3 Answers

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.

Remove pods from embedded binaries

like image 198
Naloiko Eugene Avatar answered Nov 16 '22 10:11

Naloiko Eugene


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.

like image 35
mkeiser Avatar answered Nov 16 '22 11:11

mkeiser


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.

like image 11
Mark Thormann Avatar answered Nov 16 '22 10:11

Mark Thormann