apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

How to set Bundle id via xcconfig in plist file? Is it broken ? #1118

Closed skurgansky-sugarcrm closed 3 months ago

skurgansky-sugarcrm commented 3 years ago

I have an issue with 6.2.0 version. prepare.js checks if PRODUCT_BUNDLE_IDENTIFIER and widget id in config.xml are different. If they are prepare.js will set PRODUCT_BUNDLE_IDENTIFIER from config.xml in project file. I have PRODUCT_BUNDLE_IDENTIFIER=${APPLICATION_BUNDLE_ID} in project file for purpose and i can't delete it. APPLICATION_BUNDLE_ID is set via some xcconfig files for prod and dev builds. I also have <key>CFBundleIdentifier</key<string>${APPLICATION_BUNDLE_ID}</string> in plist but it is overridden via project file after prepare.js replaces PRODUCT_BUNDLE_IDENTIFIER=${APPLICATION_BUNDLE_ID} with PRODUCT_BUNDLE_IDENTIFIER=com.acme.crm .... Can i bypass it with some configuration settings?

dpogue commented 3 years ago

If you want to make different builds of the same Cordova project with different identifiers (such as for QA, Staging, and Production environments), I suggest looking at seymour which will fill in config.xml values based on environment variables for use with CI systems.

Cordova itself only support building with the bundle identifier declared in config.xml.

erisu commented 3 months ago

Closing ticket as the above comment is sufficient.