react-native-starter icon indicating copy to clipboard operation
react-native-starter copied to clipboard

Add Rename script

Open haikov opened this issue 6 years ago • 3 comments
trafficstars

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.

haikov avatar Apr 08 '19 07:04 haikov

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..

sogangCSmaster avatar Apr 17 '19 04:04 sogangCSmaster

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?

pimvanderheijden avatar Mar 03 '20 21:03 pimvanderheijden

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

joshuadutton avatar Jul 24 '20 04:07 joshuadutton