May I change app id and name before build?

Hi!
Is it possible to change application name that is stored in config.xml?
I need it, because when I build application for testing i want to name it like “APP DEBUG”.

Sure, just edit the file. Not that you might have to ionic cordova prepare or remove and re-add the platform for the changes to take effect - test that out, I don’t know exactly which one it is right now.

It’s not exactly what I want.
I want to run ionic cordova build --release --prod and change app name before build. Replace config.xml or something else…
When I run ionic cordova build i need name "App Name DEBUG"
When I run ionic cordova build --release --prod i need name “App Name”

Could just use an npm script?

"scripts": {
    "build:debug": "node script/to/change/name/debug.js && ionic cordova build",
    "build:release": "node script/to/change/name/release.js && ionic cordova build --release --prod"
}

As long as you don’t change the app id, I believe you don’t have to re-add the platforms :slight_smile:

1 Like

Yes, what @mich356c suggested would probably work for that - but be aware that this has big effects for the content of the platforms folder. Whole iOS project folder is named after the app etc - so this can cause a lot of problems.

2 Likes

Ok! Thank you… i’ll think about it… =)