title: iOS Framework with Bitcode enabled with Xcode 11
body: <p><strong>What I am trying to do:</strong></p>
  
  <p>I am trying to build a cocoapods framework in xcode11 and then use it in an iOS App.</p>
  
  <p><strong>What I have tried:</strong></p>
  
  <ul>
  <li>Set Enable Bitcode to yes</li>
  <li>Before building the framework, I have set Other C flags to -fembed-bitcode</li>
  <li>Setting to BITCODE_GENERATION_MODE as bitcode</li>
  </ul>
  
  <p>I also tried to put this into my Podfile:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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!</p>
  
  <p><strong>What issue I am facing:</strong></p>
  
  <p>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:</p>
  
  <p>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.".</p>