Renaming Ionic app in config.xml results in errors


#1

Hello everyone,

There’s been a few topics about the proper way to rename an Ionic project. Most of them (including outside this forum) say it’s easy as changing the value of the <name> tag in the config.xml file. When I did that, some plugins stopped working. Before I opened Xcode, I made sure I build on the terminal specifically ionic build ios

See this picture:


Another error is when I run the app in an iPhone5S 8.2 device and I tap an entry in a list, it use to take me to a new view containing the details. But when I renamed the project in config.xml the tap doesn’t respond. All the other views crash. I’m not sure if it’s because the details view and other views rely on the ngCordova SQLite plugin. And, that plugin got messed up after I did this.

After looking around the internet and reading suggestions about cordova (and some Ionic), that went ahead and changed the name inside ionic.project, package.json and bower.json thinking that it’d work. But things only got worse because I can’t run it on a device anymore. After I updated all the files to a newer app name, I did the build command on the terminal ionic build ios

So before I changed the names on the other files, Xcode has this option:
:

After I changed the names on the other files, Xcode doens’t give me the option to run on a device anymore:

The situation now is that the people I’m making this app for can’t make up their minds on the name of the app. And, they don’t understand why it’s difficult. So if anyone who knows a solution to rename the app name in Ionic / Cordova flawlessly, please let me know ASAP.

My Ionic version is 1.3.16
Cordova version is 4.1.2
Xcode version is 6.2


#2

have you tried ionic platform remove ios then do ionic platform add ios then try building


#3

agree with @cyprusglobe. I would remove and readd the platform so Cordova will recreate the Xcode projects plugins from your plugins directory


#4

I never thought of that at all! And, I think it worked! Thanks @cyprusglobe.


#5

Your Welcome @junerockwell


#6

This work for me. Thank you.


#7

Your Welcome, @Bigby


#8

i cant remove the platform because of i have some oc code in the app