flatlogic / react-native-starter

🚀A powerful react native starter template that bootstraps development of your mobile application
https://reactnativestarter.com
Mozilla Public License 2.0
2.22k stars 712 forks source link

Add Rename script #23

Open haikov opened 5 years ago

haikov commented 5 years ago

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.

sogangCSmaster commented 5 years ago

Please add renaming script..

I think this process..?

  1. Update app.json file to your app name.
  2. delete ios android folders
  3. run react-native eject
  4. run react-native link

I maybe wrong..

pimvanderheijden commented 4 years ago

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?

joshuadutton commented 4 years ago

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