Executable contains incomplete bitcode error – Solved

How to solve iOS app upload issue - The executable contains incomplete bitcode.To compile binaries with complete bitcode

With new Xcode, one of the problem faced by iOS developers while uploading app to App store is bitcode related errors. Errors like the executable contains incomplete bitcode. In this post, we will learn that how to fix executable contains incomplete bitcode. error in our project.

If you are not using pods then simply open your project build settings and search bitcode  as shown in picture below

Set enable bitcode to NO

Set Enable Bitcode to NO, by default it’s set to YES. This will fix incomplete bitcode error and  your app will get uploaded successfully to the store.

If you are using pods in project then you have to write a script in your pod file that will disable Enable Bitcode to NO in all of your installed pods during pods installation phase or while you are updating your pods.

Script for disabling bitcode: 


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

Your pod file will look like this

# Uncomment this line to define a global platform for your project
# platform :ios, ‘8.0’
 
use_frameworks!
 
target ‘projectname’ do
 
pod ‘AFNetworking’, ‘~> 3.0’
pod ‘Fabric’
pod ‘TwitterKit’
pod ‘Crashlytics’
pod ‘PubNub’
pod ‘IQKeyboardManager’
pod ‘SDWebImage’, ‘~>3.8’
pod ‘GoogleMaps’
pod ‘RMUniversalAlert’
pod ‘HexColors’
 
end
 
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings[‘ENABLE_BITCODE’] = ‘NO’
    end
  end
end

 

Hope this post helps you in overcoming bitcode errors while uploading your app to app store.