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 renam
I am probably a bit late, but for the people looking for a solid solution, there is a react-native-rename npm package which can do the magic.
First of all copy the address which your want to-be-name-changed application exists. And go to your newly cloned directory.
Replace the name at the index.ios/android.js file which is given as a parameter to AppRegistry.
update the name and version accordingly on package.json remove /ios and /android folders which are remaining from your older app and from the
run $react-native upgrade to generate /ios and /android folders again. and run $react-native link for any external dependency.
finally, run $react-native run-ios or else.
What simply works for me several times is instructed below;
index.ios/android.js
file which is given as a parameter to AppRegistry
.package.json
/ios
and /android
folders which are remaining from your older app as well as the app.json
file if you have.$react-native upgrade
to generate /ios
and /android
folders again.$react-native link
for any external dependency.$react-native run-ios
or anything you want.The way I did this for android (hacky, but it works) is just changed the string app_name field in
android/app/src/main/res/values/strings.xml
It will change the name of your installed android app to whatever you put as the value.
For iOS, the way to change xcodeproj settings is also available.
Show <your app name> -> Info.plist and add Bundle display name.
changing iOS app name:
Open Info.plist
file from your project directory/ios/{appname}
directory and change Bundle display name.
<key>CFBundleDisplayName</key>
<string>NEW APP NAME</string>
For android app, you can change in android folder of your project directory.
cd android/app/src/main/res/values/
open strings.xml
file and change you app name in
<string name="app_name">NEW APP NAME</string>