question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Update appId if appId is changed in capacitor.config.json

See original GitHub issue

Feature 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:closed
  • Created 3 years ago
  • Reactions:19
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
damienromitocommented, May 17, 2021

I’d like to generate several app from the same base code. This feature would be very helpful !

3reactions
jcesarmobilecommented, Feb 16, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found