XCode bundle identifier not updating from capacitor.config.ts

I realise that ios platform specific changes can and should be made in XCode. But is there a way to sync changes made in capacitor.config.ts to the XCode project?

I changed the appId in capacitor.config.ts but none of the following commands sync the change to the project.

ionic capacitor update
ionic capacitor build
ionic capacitor sync
ionic capacitor copy ios

It seems the only way is to remove the platform and add it again.

Does the config file only get used by ionic capacitor add ... ?

Yes and no.

For app name and package name/bundle identifier or any other configuration used on the native project configuration it’s only used on npx cap add because Capacitor never modifies the native project after creation.

Other configuration like plugin configurations can be changed at any time.

1 Like