ios - for - Xcode-Error ITMS-90635-Invalid Mach-O in bundle-submitting to App store

xcode windows (5)

I just got this error when submitting an app to the app store.

Does this mean I need to set ENABLE_BITCODE for all dependencies? I tried that but then got errors saying the dependencies were not compatible with bitcode (or something like that)...

For Carthage

  1. Open your libraries in your project folder (Carthage->Checkouts->[lib name])
  2. Then open each lib in Xcode
  3. Set Enable Bitcode - No in build settings
  4. Do it for each lib in your list
  5. Build carthage carthage build --platform xxx

Then you can archive and submit to the Appstore successfully

For those who are having build error after setting "Enable BitCode" to Yes. I have to update all the library.But,the easiest part is I use Cocoapods.So,please update all your pod project : (One by one) or All

Then set Enable BitCode to "No" before you archive.

Then Archive>>Upload>>It will pass this error.


I had the same problem earlier this morning. In fact the answer is in the error : "Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build settings"

I had a target (with ENABLE_BITCODE set to NO), using multiple pods having ENABLE_BITCODE set to YES. So, all I had to, do is set ENABLE_BITCODE to YES in my project target. But I guess you have a choice, you can also set ENABLE_BITCODE to NO in all the libs your are using.

I just unchecked "include bitcode" and it started to upload

The easiest and most common fix:

You can uncheck "Include Bitcode" when submitting the app via Xcode.

If you use xcodebuild , you can use pass an exportOptionsPlist with the value of uploadBitcode set to false. In my case, we're using xctool to build the app and don't have the ability to pass an exportOptionsPlist , so we had to remove bitcode from all of our frameworks.

If anyone is using cocoapods and wants to disable bitcode for their frameworks, you can just add the following to your podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'

Via https://.com/a/32685434/1417922

To add a little more clarification as to what's going on with this issue:

It seems that apple just started enforcing this yesterday. If your main binary has bitcode disabled, but you include a static library or framework that has bitcode enabled, it will fail validation. It goes the other way too: if your main binary has bitcode enabled, but you include a library/framework that has bitcode disabled, it will fail validation.

I had a few dependencies from GoogleMaps and Amazon that made it non trivial to switch everything to enable bitcode, so I simply disabled it and removed bitcode from one static library I had imported in my project. You can strip bitcode from any binary by using this following command

$ xcrun bitcode_strip -r {Framework}.dylib -o tmp.dylib
$ mv tmp.dylib {Framework}.dylib

While the above are solutions to the problem, I don't agree that if the main binary has bitcode disabled that all of the included binaries should need it as well. Bitcode is just some IR code that Apple can use for app thinning--why don't they just strip it from other binaries (which I assume is what they previously did)? This doesn't make a ton of sense to me.

Apple thread