This is more of a question:
Whats the way to go when having different bundle-ids for android and iOS? Add capacitor with one bundle-id and then change it manually in either XCode or Android Studio?
Will the CLI ever overwrite this config? Because if thats the case there should probably be appIdAndroid and appIdIos in capacitor.config.json.
Yep just change it manually in Xcode/Android Studio. We won't modify it after the project is created.
Will keep an eye out for this question and possibly add it to the docs.
Hi, is this possible to consider this requirement again please? Thanks!
same for us each sync override it just allow us to have a specific one by platform section it's painfull
To deal with this issue I created a bash script that replaces android/app/src/main/assets/capacitor.config.json with a file that has the correct bundle id. And then I created an npm command that runs that shell script after running ionic sync.
so the shell script looks like this:
rm android/app/src/main/assets/capacitor.config.json
cp build/resources/capacitor.config.json android/app/src/main/assets/capacitor.config.json
and the npm command looks like this.
"scripts": {
...
"sync": "ionic cap sync && ./scripts/post-sync.sh"
...
}
and then I can just run
npm run sync
instead of the normal ionic command
Most helpful comment
Hi, is this possible to consider this requirement again please? Thanks!