3

I know there are a lot of possible solutions but none of them have worked for me so far. I am using a framework called Alamofire.framework and Kingfisher.framework. I built an iOS App which I would like to submit to AppStore. I archived it and then I come in the Archives window and click "Upload to App Store".

The following error occurs: "Found an unexpected Mach-O header code: 0x72613c21" with the following logs:

IDEDistribution.critical.log

2016-01-08 06:00:47 +0000 [MT] Failed to generate distribution items with error: Error Domain=DVTMachOErrorDomain Code=0 "Found an unexpected Mach-O header code: 0x72613c21" UserInfo={NSLocalizedDescription=Found an unexpected Mach-O header code: 0x72613c21, NSLocalizedRecoverySuggestion=} 2016-01-08 06:00:47 +0000 [MT] Presenting: Error Domain=DVTMachOErrorDomain Code=0 "Found an unexpected Mach-O header code: 0x72613c21" UserInfo={NSLocalizedDescription=Found an unexpected Mach-O header code: 0x72613c21, NSLocalizedRecoverySuggestion=}

IDEDistribution.standard.log

2016-01-08 06:00:47 +0000 [MT] Beginning distribution assistant for archive: UCDA, task: Validate 2016-01-08 06:00:47 +0000 [MT] Automatically selecting the only availaable distribution method 2016-01-08 06:00:47 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for : Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/chikitin/Library/Developer/Xcode/Archives/2016-01-07/UCDA 1-7-16, 11.59 PM.xcarchive/Products/Applications/UCDA.app/Frameworks/FBSDKLoginKit.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/chikitin/Library/Developer/Xcode/Archives/2016-01-07/UCDA 1-7-16, 11.59 PM.xcarchive/Products/Applications/UCDA.app/Frameworks/FBSDKLoginKit.framework" did not contain a "archived-expanded-entitlements.xcent" resource.} 2016-01-08 06:05:27 +0000 [MT] Canceled distribution assistant

IDEDistribution.verbose.log

2016-01-08 06:00:47 +0000 [MT] IDEDistributionItem init

I hope someone could help me with this.

Thanks a lot!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Alan Campos
  • 103
  • 2
  • 6
  • 2
    Possible duplicate of [Found an unexpected Mach-O header code: 1918975009 in xCode 6](http://stackoverflow.com/questions/26559948/found-an-unexpected-mach-o-header-code-1918975009-in-xcode-6) –  Jan 08 '16 at 06:32

5 Answers5

5

I ran into this error with a FacebookSDK framework. I removed it from the Embed frameworks list and it solved the issue. Inspect the log and find the framework causing the error.

Adam Mendoza
  • 5,419
  • 2
  • 25
  • 31
4

I have the same issue with facebook SDK ... I create a bug task on facebook (bug report), the problem appears with the new SDK version . And No solution works ... If you have found a solution let us know. Thank you. I run my app without facebook connect actually.

Stan Sarr
  • 243
  • 1
  • 8
1

You need to remove any Frameworks’ related files in the "Copy Bundle Resources” in the build phases. Please see https://kobkrit.com/how-to-fix-found-an-unexpected-mach-o-header-code-0x72613c21-on-submitting-to-app-store-7d5b8ec180c

0

Remove any frameworks or folders with frameworks from Build Phases -> Copy Bundle Resources:

enter image description here

This solved the error for me!

itzo
  • 1,220
  • 14
  • 18
0

I had no frameworks folder but had ios folder in Build Phases -> Copy Bundle Resources, I removed ios folder and rebuild the project, created archive again, it worked for me.

sandeep
  • 51
  • 1
  • 2