ioscarthagebitcodexcode-project

How to disable Bitcode on Carthage dependencies


How to disable Bitcode on dependencies where it's enabled?

This question is the opposite scenario of the question "Bitcode disabled on Carthage dependencies". Unfortunately, while the given answer by the OP was using a nice trick by stripping all instances of ENABLE_BITCODE = NO; in the project file, it's inapplicable to add that line where it's missing.


Solution

    1. Have an xcconfig file for carthage to add build properties when building the frameworks.
    XCODE_XCCONFIG_FILE="myConfigFile.xcconfig" carthage bootstrap --platform iOS
    
    1. 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.