MoPub.bundle causing Mach-O errors


#1

I’m archiving my iOS app for submission to the App Store. I’m getting the following error when validating the archive.

2015-08-01 17:47:03 +0000 [MT] Failed to generate distribution items with error: Error Domain=DVTMachOErrorDomain Code=1 “Found an unexpected Mach-O header code: 1918975009” UserInfo=0x7fc9b9f6c040 {NSLocalizedDescription=Found an unexpected Mach-O header code: 1918975009, NSLocalizedRecoverySuggestion=}

This error goes away when I remove the MoPub.bundle from the ‘Copy Bundle Resources’ step in Build Phases but this naturally breaks the MoPub integration.

The only related info I can find is on Stack Overflow here and this GitHub issue here. I haven’t been able to find a solution that works yet. I installed the MoPub framework with the latest Fabric app.


#2

Hello Conor,

This seems to be a configuration issue when you integrate the MoPub framework. Do you have a screenshot of your build settings and build phases you can post here to see if there is anything we can point out to be an issue?

Could you provide more context as to what you are using as well? Please clarify. What version of XCode are you using? Are you using Cocoapods? If so, what version? Are you using Swift? Please provide us details and context here of your specific setup causing the issue so we may troubleshoot further.

Thanks!


#3

Hi, thanks for your reply. I managed to fix the issue by removing TwitterKit and TwitterCore from the MoPub.bundle. I discovered this through trial and error.

In case it’s helpful, I’m using Swift, I’m not using Cocoapods and I am using Xcode 6.4. The libraries I removed from the MoPub.bundle were already included in the Link Binary with Libraries build phase.


#4

Hey Conor,

Awesome you were able to solve the issue! Looks like the duplication of those libraries caused the issue.

Thank you for letting us know the solution here. I’m sure that other people that run into the issue will benefit.

Thanks!