junedomingo / react-native-rename

Rename react-native app with just one command
MIT License
2.63k stars 261 forks source link

If old and new name is similar, then new name will be wrong in many place #235

Closed flyskywhy closed 1 year ago

flyskywhy commented 1 year ago

Describe the bug If old and new name is similar e.g. old is "xyza" and new is "xyzab", then will be wrong "xyzabb" in

android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h
android/app/src/main/jni/MainComponentsRegistry.h
app.json
package.json

and

ios/xyza.xcodeproj/xcshareddata/xcschemes/xyza.xcscheme

will be wrong xyza.xcscheme (should be xyzab.xcscheme):

ios/xyzab.xcodeproj/xcshareddata/xcschemes/xyza.xcscheme

To Reproduce Steps to reproduce the behavior:

  1. old is npx react-native-rename "xyza" -b com.flyskywhy.xyza
  2. new is npx react-native-rename "xyzab" -b com.flyskywhy.xyzab

Expected behavior runs well.

Environment (please complete the following information):

junedomingo commented 1 year ago

Hi @flyskywhy the trick is to rename to a different name first, e.g if your old name is "xyza" then just use "awesomeapp", after that, then use "xyzab".

flyskywhy commented 1 year ago

Ok, I will use the trick preferentially for now, thanks!

junedomingo commented 1 year ago

I will close this for now