title: Failed to verify bitcode while exporting archive for ad hoc distribution - tried Xcode 8.3.3 & Xcode 9
body: <p>Apps containing our framework complains about missing bitcode while exporting archive for Ad-hoc distribution.</p>
  
  <p>I have gone through the documentation provided by Apple in this regard
  <a href="https://developer.apple.com/library/content/technotes/tn2432/_index.html" rel="noreferrer">Technical Note TN2432</a>. The documentations' listed possible root causes do not resemble our scenario. (We are not using assembly instructions or have malformed info.plist file)</p>
  
  <p>I have gone through following similar questions posted on SO</p>
  
  <p><a href="https://stackoverflow.com/questions/43141793/error-while-exporting-with-bitcode-enabled-symbol-not-found-for-architecture-ar">Error while exporting with Bitcode enabled (symbol not found for architecture armv7)</a></p>
  
  <p><a href="https://stackoverflow.com/questions/35586516/is-it-possible-to-create-a-universal-ios-framework-using-bitcode">Is it possible to create a universal iOS framework using bitcode?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/30848208/new-warnings-in-ios-9">New warnings in iOS 9</a></p>
  
  <p>But the provided solutions do not seem to work.</p>
  
  <p>I have tried adding <code>BITCODE_GENERATION_MODE</code> flag in User-Defined build settings. I also tried adding <code>-fembed-bitcode</code>-marker &amp; <code>-fembed-bitcode</code> in Other C flags in framework target.</p>
  
  <p>I check if bitcode segments are present in my generated framework using the <a href="https://stackoverflow.com/questions/35586516/is-it-possible-to-create-a-universal-ios-framework-using-bitcode">suggested</a> command </p>
  
  <pre><code>otool -l -arch arm64 &lt;framework_name&gt; | grep __LLVM
  </code></pre>
  
  <p>It shows 2 segments</p>
  
  <blockquote>
    <p>segname __LLVM</p>
    
    <p>segname __LLVM</p>
  </blockquote>
  
  <p>But while exporting the archive, Xcode still complains about absent bitcode. </p>
  
  <p>I tried to upload app on App store to verify if this issue is due to Xcode versions (I tried 8.3.3. and 9.0), but I get following email about build import error from iTunes Store.</p>
  
  <blockquote>
    <p>While processing your iOS app, APP_NAME 1.0(4), errors occurred in the app thinning process, and your app couldn’t be thinned. If your app contains bitcode, bitcode processing may have failed. Because of these errors, this build of your app will not be able to be submitted for review or placed on the App Store. For information that may help resolve this issue, see Tech Note 2432.</p>
  </blockquote>
  
  <p>PS: Disabling bitcode is not an option for us as host app need to support bitcode.</p>
  
  <p><a href="https://i.stack.imgur.com/bbTLU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bbTLU.png" alt="Error while exporting the Archieve"></a></p>