Incorrect name in config.xml
From @shaneparsons on June 9, 2017 13:14
Ionic version: (check one with "x") [ ] 1.x [ ] 2.x [x] 3.x
I'm submitting a ... [x] bug report [ ] feature request [ ] support request
Current behaviour:
Creating a new project (i.e. ionic start [app-name]) will not update the name in the config.xml. It will remain as MyApp unless you intentionally remember to change it.
For a production app it will obviously be noticed at some point, but for a quick test app, it's often forgotten.
Expected behaviour: For the config.xml to have the name you give the new app by default.
Steps to reproduce:
- Run
ionic start test - Once the project is created, open up the config.xml and look at the name tag. It will be MyApp.
Ionic info:
global packages:
@ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.1
Ionic CLI : 3.3.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.3.0
@ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.3.0
System:
Node : v8.0.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 5.0.13
Copied from original issue: ionic-team/ionic#11996
Bit of a weird situation. We don't assume the Ionic App is a Cordova app when you do ionic start. The Cordova CLI Plugin is installed upon first invocation of ionic cordova .... But... all of our starters still have Cordova files such as config.xml. So when you run ionic start, the CLI doesn't know/care about config.xml.
Some code changes are needed in the CLI to make this happen, but you would also need to run ionic start with the --cordova flag for it to change the name during start.
I see your point about the config.xml not needing to be there until you start Cordova. So the question then becomes when I do an ionic cordova prepare should that create the config.xml file? And if so, is there a way to have default to the name of the app you used when you created the Ionic project. There are some other things that would be nice to update, although not mandatory such as description, author, etc.
Yes, precisely. It would create the file with any ionic cordova invocation if the file is missing, using default values that the Ionic CLI knows. We don't know the author, but we could use the package.json file.
@shaneparsons @nelsonkd Please follow this issue: https://github.com/ionic-team/ionic-cli/issues/2595
I am condensing.