Renaming a React Native project?

前端 未结 16 645
独厮守ぢ
独厮守ぢ 2020-11-28 02:45

Are there instructions for what needs to be changed in order to rename a React Native project? I have an app called something along the lines of MyAppIOS and I want to renam

相关标签:
16条回答
  • 2020-11-28 03:21

    You might also want to check out npm package (react-native-rename):

    Usage:

    react-native-rename < newName >

    It works fine for my project.

    0 讨论(0)
  • 2020-11-28 03:23
    1. Update displayName in app.json to the new name
    2. Delete ios/ and android/ directories in root project
    3. At command line Run:

      react-native eject
      react-native link 
      
    0 讨论(0)
  • 2020-11-28 03:24

    Try to use react-native-rename library from npm. Works like a charm

    0 讨论(0)
  • 2020-11-28 03:26

    In-Case None of solution worked for you or trying something broke your app. This is going to basics.

    1. Init a new react-native project with whatever name you want to change your app to.
    2. Copy Dependency list from your previous project to new one's package.json
    3. Copy old project files, make sure of keeping the same structure.
    4. Run npm install
    5. Run react-native run-android

    This should get you back on track

    0 讨论(0)
提交回复
热议问题