react-native-starter
react-native-starter copied to clipboard
Add Rename script
It's a pretty common task - to rename an application you are building from the starter kit. So let's make it easy.
Pepperoni app kit has a script for renaming and it worked fine for their kit. It may be a great point to start: https://github.com/futurice/pepperoni-app-kit/blob/master/support/rename.sh
I think we need to write some bash script that will let us to run something like yarn rename, ask a few questions (new display name, new bundle id, etc.) and would change code in all required places.
Please add renaming script..
I think this process..?
- Update app.json file to your app name.
- delete ios android folders
- run react-native eject
- run react-native link
I maybe wrong..
All right, I ran rename.sh
After that I think I have to copy some files like project.pbxproj and some .xcscheme files to get the project back in a working state again in Xcode. Yet, I suspect there are still some steps missing. After doing a clean cd ios; pod install I ran into a problem of a missing target:
[!] Unable to find a target named `Mijnsportteam-tvOS` in project `Mijnsportteam.xcodeproj`, did find `Mijnsportteam`.
Is rename.sh meant to run only directly after cloning the starter kit?
I do this with the following command:
npx react-native-rename MY_PROJECT_NAME
If you want, you could just add that as a package.json script