Sunday, 25 September 2016

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



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. In this post we will learn that how to fix 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

Set enable bitcode to NO


Set Enable Bitcode to NO, by default it's set to YES. This will fix the 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. 

No comments:
Write comments