Found an unexpected Mach-O header code: 0x72613c21

After updating to Xcode beta 2 and fixing the new build errors (mostly Foundation and UIKit class functions becoming properties) I'm getting a build error on my main app target:

CopySwiftLibs /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Engagement.app
    cd /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10
    export CODESIGN_ALLOCATE=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export SDKROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk
    builtin-swiftStdLibTool --copy --verbose --sign - --scan-executable /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Engagement.app/Engagement --scan-folder /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Engagement.app/Frameworks --scan-folder /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Engagement.app/PlugIns --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/FLAnimatedImage.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/NYTPhotoViewer.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/TNKRefreshControl.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/TNKImagePickerController.framework --scan-folder /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/RealmUI.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/AFNetworking.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/OnePasswordExtension.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/KVOController.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/PhoneNumberKit.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/FMDB.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/TNKFoundation.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/UTIKit.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/CRToast.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/SlackTextViewController.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/FormatterKit.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Crashlytics.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/CacheKit.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/Locksmith.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Fabric.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/JGProgressHUD.framework --scan-folder /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/RealmCore.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/Analytics.framework --scan-folder /Users/davbeck/Documents/Development/ACS/Realm/RealmEngagement.iOS10/Carthage/Build/iOS/SocketIOClientSwift.framework --platform iphonesimulator --destination /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Engagement.app/Frameworks --strip-bitcode --resource-destination /Users/davbeck/Library/Developer/Xcode/DerivedData/Engagement-evkgwhedhxhvxvbtbsxvdzuxhben/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Engagement.app --resource-library libswiftRemoteMirror.dylib
error: Found an unexpected Mach-O header code: 0x72613c21

Oddly it looks to be related to the swift libraries?

Same error.


I use Chromecast framework and other two personal static library...


error: Found an unexpected Mach-O header code: 0x72613c21 -> When try "Copy Swift standard libraries"

I'm getting the same. I'm not using CocoaPods.

I'm also having the same problem, and I'm not using CocoaPods. I've tried setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO on my targets that contain Swift, but still not working.


HALP!

Thank you, this was very helpful. We have a large complicated project that uses CocoaPods, internal libraries, mixed ObjC/Swift in the main project, etc. I can confirm that what worked for us was simply removing Fabric and Crashlytics. We didn't need to do any CocoaPods-related changes, but I don't think any of our pods use Swift.


So anyway, removing Fabric/Crashlytics is a necessary step but possibly not sufficient to avoid this error.

I'm having the same problem, using CocoaPods and Fabric. 😟

I also have the same problem.

It was returned to the previous version (v. 8.0 beta 8S128d).

Fortunately it was left also.

It does not occur a problem with the same code.

Same problem here. Started with beta 2! With beta 1 everything was building fine. Problem occurs with both Swift 2.3 and Swift 3.0

this may help someone.


My project was hosted on GitHub.


- When I cloned the project to the desktop and compiled, I received this error.

- Though, when I checked out the project within Xcode 8 beta 2 using "Source Control->Checkout" and compiled, there was no error.


Somehow projects appear subtly different when downloaded vs checkout.


Brian.

I just confirmed that this is a Xcode issue. I am running into the same issue with libraries from Google ( Firebase / Analytics ) causing the error you mentioned. Removing them from the project solved my issues. Except, I added them with the intention of actually using them. 😐

Getting the same error. Ended up rolling back to XCode 8 Beta 1 for the time being.

Xcode Beta 3 still reporting this error for me:


error: Found an unexpected Mach-O header code: 0x72613c21

Yup, me too with XCode Beta 3

Me too. Bummer, was hoping this was going to be fixed.

The same for me. Tried all kind of workarounds and still no success.

I have the same problem, the pods now builds, but on the last step I still get the error, did you figure it out?

I've also found that the problem is resolved by removing Fabic/Crashlytics from my project.

I was having the same issue. Setting "Always Embed Swift Standard Libraries = NO" worked right away for me. Thanks for the help

Still happening in beta3, I don't have cocoapods or fabric/crashlytics

still happening for me in beta 3 as well. I have cocoapods. crashlytics is included as a library separately.

Still encountering this problem, Found an unexpected mach-o error. I download Xcode 8 beta 3 and converted my codes to swift 3, then this happened 😟 Has anyone found asolution already? Thanks

I have the same problem here, and removing fabric/crashlytics isn't an option for me. Is Xcode beta 1 still available for download from anywhere? I don't have it.

OK, I confirmed that removing the crashlytics library did allow XCode 8 b3 to compile for me.


Not a long term solution, by any means...

For those who are getting this to work by removing Fabric, we had an old version of the fabric/crashlytics frameworks linked. In a test project, I am able to reproduce the error with only those frameworks included. If I pull the latest frameworks via cocoapods, those versions are able to link successfully for us.


  pod 'Crashlytics', '3.7.2'
  pod 'Fabric', '1.6.7'

What version(s) of CocoaPods are people running when they're seeing this error?

After seeing that others were getting their app to build by removing Fabric/Crashlytics, I updated to the latest version of them and now it builds fine. Thanks everyone!

Found an unexpected Mach-O header code: 0x72613c21
 
 
Q