3

What I am trying to do:

I am trying to build a cocoapods framework in xcode11 and then use it in an iOS App.

What I have tried:

  • Set Enable Bitcode to yes
  • Before building the framework, I have set Other C flags to -fembed-bitcode
  • Setting to BITCODE_GENERATION_MODE as bitcode

I also tried to put this into my Podfile:

post_install do |installer|
installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
        config.build_settings['ENABLE_BITCODE'] = 'YES'
    end
end
end

The via post archive script I build a fat library which contains archs: i386, x86_64, armv7 and arm64. When I check with otool if Bitcode is there for arm64, it says YES!

What issue I am facing:

After integrate the fat library into my main app everything is fine with building the app. But when I try to upload the app to testflight, I get the following error message:

error: exportArchive: App Store Connect Operation Error. ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "S2S Demo App.app/Frameworks/s2s_sdk_ios.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains arm64(bitcode), while the nested bundle Mach-O contains arm64(machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting.".

davidOhara
  • 1,008
  • 5
  • 17
  • 39

0 Answers0