1
votes

I have a working react native app (without expo), running and compiling in both Android and iOS devices. Now I'm trying to rename the app, but I'm having problems with that.

Steps followed:

  • I have deleted both ios and android directories.
  • Changed the project name in my app.json
  • Regenerated the android and ios directories with react-native upgrade --legacy (cause eject is not working anymore)
  • Updated my podfile with the need
  • Pod install

When i tried to compile my app via xcode, I got "null is not an object (evaluating '_RNGestureHandlerModule.default.Direction')

I guessed that was due to the autolinking when you install some react native third party components. So I deleted node_modules, and installed all react native navigation again. Then I ran react-native link. The previous error went away.

Now, I'm stuck with:

Target 'cjlrnneTests' has target dependency on Target 'cjlrnne'

That command depends on command in Target 'cjlrnne': script phase “[CP] Copy Pods Resources”

Honestly, I don't know what else more to do / look for.

Can anyone please provide with some clue, or the steps to change a RN app's name?

Thanks!

1
No i haven't, i'm trying to do it all by myself to understand the whole process - Chux
No worries, if you find yourself at a loose end, you could always take a look at the src code and look at what the scripts are doing. - Dan
Will try it later, thanks ;) - Chux
I think the safest way is to create another project with the new name and install dependencies again because you're dealing with complex batches for both iOS and Android - Ahmad Abdullah

1 Answers

4
votes

You can try this package for renaming the app. react-native-rename

https://www.npmjs.com/package/react-native-rename

react-native-rename <newName>

It will automatically configure all the things.