How can I regenerate ios folder in React Native project?

后端 未结 13 681
忘掉有多难
忘掉有多难 2020-11-29 20:13

So a while ago I deleted the /ios directory in my react native app (let\'s call it X). I\'ve been developing and testing using the android emulator but now I\'d like to make

13条回答
  •  春和景丽
    2020-11-29 20:46

    1. Open Terminal/cmd
    2. Move to the folder/directory where the project "ProjectName" folder exist(Do not go into project directory)
    3. run command as: react-native init "ProjectName" and it will warn that project directory already exist but you continue.
    4. It will install all updated node modules as well as missing platform (android/ios) folders inside project without disturbing the code already written.
    5. cd "ProjectName" and then cd ios and then run pod install

    PS: Take backup of your code in case it changes App.js

提交回复
热议问题