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, 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