Updating app id on an already cordova-prepare-d workspace
- Dominant language
- JavaScript
- Stars
- 967
- Forks
- 344
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 9
Description
# Feature Request
## Motivation Behind Feature
On my project, a `cordova prepare` step can take a lot of time (mainly because of cocoapods which takes minutes to install all required dependencies for some of my plugins)
At the same time, I have the need to generate multiple flavours of the same app id (see it as a white-labelled app) based on exactly the same source code.
Currently, I am updating app id in `config.xml` and generating my whole build (`cordova prepare` then `cordova run android --device --release`) but it takes *a lot* of time only for a simple key change.
I was wondering if a CLI command allowing to perform this, either after we ran `cordova prepare` or, still better, to update and re-sign the generated artefacts (ipa, apk, aab and so on) after their generation would be a feature worth to consider in the CLI ?
I know there was some other issues on the same topic in the past here : #463 and #528 (and I looked at @dpogue 's [seymour](https://www.npmjs.com/package/seymour)) but for me, this is a different feature here (but I'm aware this won't be something easier than the other issues... I suppose this may require a lot of changes from platforms to take care of this CLI change)
## Feature Description
A CLI allowing to change app id on either the workspace, or an artefact :
```
cordova update-appid android --to=my-new-app-id
cordova update-artefact-appid android --packageType=apk-release --artefact=./platforms/android/app/build/outputs/apk/app-release.apk --to=my-new-app-id
```
I don't see this breaking things as this would be a new command.
However, this new command would have to be taken into consideration in the Platforms CLI API as every platform (and potentially, plugins) may use the app id in their files generation (even file names may be considered so ... potentially a lot of side effects to take into consideration)
## Alternatives or Workarounds
Current workaround is to `sed` into `config.xml`, then `cordova clean && cordova prepare && cordova run` again (which takes a looooot of time in my CI.
Contributor guide
Research direction
Start with the existing cordova prepare, cordova run, and config.xml flow described in the issue, then compare the proposed update-appid and update-artefact-appid entry points. Identify how Android and other platform artefacts use the app id. Done means a documented CLI approach can update a prepared workspace or generated artefact without rerunning the full prepare step and can cover the stated package types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, javascript, nodejs
- Domain
- build-system, cli, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100