Based on the react-native version you are using there are bunch of files that have to be changed on both platforms (android and ios)
List of files to edit:
IOS
- [application_build_scheem].plist (this is a dict/xml file that contains keys that are used by default if no changes added to project (react-native-cli init type of project)
ANDROID
- strings.xml (change app_name key value)
- manifest.xml (change package attribute)
- build.gradle (change applicationId value)
- MainActivity.java (change java class package)
- MainApplication.java (change java class package)
It's worth mentioning that there is an an npm module (https://www.npmjs.com/package/react-native-ci-tools) that does all of the above; use it and make life easy.
Update (6/Mar/2019)
Update Folder Paths:
We also need to change the folder paths to match new name -- change com.oldName
to com.newname.mobile
, then change folder paths from app/src/java/com/oldName/
to app/src/java/com/newname/mobile/
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…