Disable bitcode for project and cocoapods dependencies with Xcode 7?
To set this setting in a way that doesn't get overridden each time you do a pod install
you can add this to your Podfile
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
How to disable Bitcode on Carthage dependencies
- Have an xcconfig file for carthage to add build properties when building the frameworks.
XCODE_XCCONFIG_FILE="myConfigFile.xcconfig" carthage bootstrap --platform iOS
- Where myConfigFile.xcconfig would disable bitcode:
ENABLE_BITCODE[sdk=iphoneos*] = NO
Credit Brennan Taylor on https://github.com/Carthage/Carthage/issues/2440.
Thanks to Benjamin Bojko for the link.
Xcode 7 + Dropbox Core API: Simply disable Bitcode?
Since I asked this question I simply set the option Enable Bitcode
to No
in the targets Build Settings
while using Yes
in the Widget and Apple Watch targets. That worked just fine and I did not notice any problems or limitations.
Now I tried to release a new version of my app to the App Store and I noticed a check box Include Bitcode
when uploading the app file to Apple. When this check box is enabled I receive the following error:
Invalid Match-O Format. The Match-O bundle "MyApp.app/PlugIns/MyApp WatchKit Extension.appex" isn't consistent with the Match-O in the main bundle.
The main bundle Match-O contains armv7(machine code) and arm64(machine code), while the nested bundle Match-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code).
Varify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting.
I have no idea why this is a problem now while all other version I uploaded during the last year passed without any problem. However the problem can easily be solved by un-checking the Include Bitcode
check box. The upload is then accepted without any problem.
But there is a better solution: As Greg pointed out, Dropbox finally released a Bitcode enabled version of the SDK!
Download the new SDK 1.3.14, include it in your project and set ENABLE_BITCODE
to Yes
for all targets, and you are done. At least until Apple finds a new way to disturb your release workflow :-)
How to ENABLE_BITCODE in Xcode 7?
If you are using a third-party framework or library that was updated for iOS 9, and you don't want to include bitcode, then you should check to see if a version of the framework was provided without bitcode
. See Apple's note on when to include it in your app bundle:
For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode.
To disable/enable bitcode
in your project, follow these steps:
- In the project build settings, make sure you have enabled All settings to be visible.
- The Build Options are the 4th section down. Select Yes or No for the
Enable Bitcode
option.
Related Topics
Uitableviewcelldeleteconfirmationcontrol Issue
Change Width of a Uibarbuttonitem in a Uinavigationbar
How to Express Strings in Swift Using Unicode Hexadecimal Values (Utf-16)
Alert View Is Showing White Rectangle in iOS7
Swiftui - Animations Triggered Inside a View That's in a List Doesn't Animate the List as Well
How to Draw a Circle Path with Color Gradient Stroke
How to Copy SQLite Database When Application Is Launched in iOS
How to Call Method from Viewcontroller in Gamescene
Find Attributes from Attributed String That User Typed
How to Tap on a Specific Point Using Xcode Uitests
Xcode 7 Supporting Watch Os1 and Os2
Uiwebview and Safari Comparison
Changed +Load Method Order in Xcode 7
How to Calculate Actual Font Point Size in iOS 7 (Not the Bounding Rectangle)
Setting "Applelanguages" Doesn't Change App Language
Singleton in iOS Objective C Doesn't Prevent More Than One Instance
How to Convert an Uiimage to Grayscale in Swift Using Cifilter
How to Figure Out Which Url Is Being Blocked by App Transport Security