feat: Update appId if appId is changed in capacitor.config.json
See original GitHub issueFeature Request
Describe the Feature Request
When a init or add command is executed (to add a android or ios platform)the appId is read from the capacitor.config.json and used to setup the native platforms. If for some reason the appId needs to be diferent there’s a need to update it manualy in a lot of native files. The same seems to be happening to the “appName”.
Platform Support Requested
- Android
- iOS
- Electron
- Web
Describe Preferred Solution
npx cap copy or other command to update native platforms from the capacitor.config.json.
Related Code
{ "appId": "com.app.versiondev", "appName": "Dev App Sample", "bundledWebRuntime": false, "webDir": "www", "npmClient": "npm", "plugins": { "PushNotifications": { "presentationOptions": [ "badge", "sound", "alert" ] } } }
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Does capacitor.config.json imply all apps must have the same ...
Does capacitor.config.json imply all apps must have the same app ID? ... There doesn't seem to be room to config different app IDs...
Read more >Capacitor Configuration | Capacitor Documentation
... TypeScript in your project, you can use a capacitor.config.json file in the same way. ... appId?: string; /** * The human-friendly name...
Read more >Self-hosted Live Updates Setup - Appflow - Ionic.io
Check out the original Live Update solution featuring Appflow-hosted live updates ... With the app created, note the APP ID that appears at...
Read more >Capacitor has so few documentation for inoic compared to ...
If it's anything like Cordova then you need to remove and then ... Just change the appId in capacitor config and sync to...
Read more >Change Log - CocoaPods
cli: Also update preferences plugin if present (#5831) (b9d5954) ... feat(cli): make init use values from capacitor.config.json as defaults (#2620) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d like to generate several app from the same base code. This feature would be very helpful !
This is not going to be implemented in Capacitor as Capacitor’s policy is to never edit the user’s native project after creation.
Users interested in changing the bundle identifier, package name and some other properties programmatically or with yaml files can take a look at capacitor-configure project https://github.com/ionic-team/capacitor-configure