Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS: xcodebuild command disable bitcode in Build Settings

I want to disable Bitcode in the build settings of a .xcodeproj through terminal commands. I have searched all over but only found commands to build or archive the project from the terminal. Can you please give me an example how this command looks like?

Thank you

like image 400
JavaAndroider Avatar asked Oct 01 '15 14:10

JavaAndroider


People also ask

Is Bitcode required iOS?

How about bitcode for iOS apps? It was never required for iOS, the way it was for watchOS and tvOS.

Should I include Bitcode for iOS content?

For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.

Is it safe to disable Bitcode?

If you turn BitCode on, then the intermediate representation of the compiled program gets uploaded and Apple will able to recompile and/or optimize your apps for future architectures (as described here). Turning it off is very safe for the time being.


1 Answers

You can list all the keys and values of your project build settings with the command

xcodebuild -showBuildSettings

Then find one or more keys you want to override, e.g. ENABLE_BITCODE. These keys can be included as parameters in the build command like so:

xcodebuild -target <your target> -configuration <your configuration> ENABLE_BITCODE=NO
like image 53
oyvindhauge Avatar answered Oct 04 '22 11:10

oyvindhauge