Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming a React Native project?

Tags:

react-native

Are there instructions for what needs to be changed in order to rename a React Native project? I have an app called something along the lines of MyAppIOS and I want to rename it to simply MyApp (now that Android support is out)

like image 294
Some Guy Avatar asked Sep 28 '15 19:09

Some Guy


People also ask

How do I rename a project in ios?

Step 1 - Rename the projectClick on the project you want to rename in the "Project navigator" in the left panel of the Xcode window. In the right panel, select the "File inspector", and the name of your project should be found under "Identity and Type". Change it to your new name.


1 Answers

You can change the name attribute in package.json, run react-native upgrade, and just let react overwrite the android/ios files. Don't overwrite your index files if there is unsaved code, however.

Then change your Appregistry line from

AppRegistry.registerComponent('MyAppIOS', () => MyAppIOS); 

To:

AppRegistry.registerComponent('MyApp', () => MyApp); 
like image 64
denixtry Avatar answered Oct 10 '22 07:10

denixtry