How can I regenerate ios folder in React Native project? How can I regenerate ios folder in React Native project? ios ios

How can I regenerate ios folder in React Native project?


The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.

  • First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
  • Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
  • Change the name and version accordingly on package.json
  • Delete /ios and /android folders which are remaining from your older app.
  • Run $react-native upgrade to generate /ios and /android folders again.
  • Run $react-native link for any native dependency.
  • Finally run $react-native run-ios or anything you want.


Simply remove/delete android and ios (keep backup android and ios folder) and run following command:

  react-native ejectSupported version :     react-native <= 0.59.10    react-native-cli <= 1.3.0    react-native upgrade --legacy trueSupported version :         react-native >= 0.60.0        react-native-cli >= 2.1.0 

Ref : link

Edited(March 2021)

npm i react-native-ejectnpm i @react-native-community/clireact-native eject

will generate the both android and ios folder.

Ref.: link


Note as of react-native 0.60.x you can use the following to regenerate ios/android directories:

react-native upgrade --legacy true

Credit here: https://github.com/facebook/react-native/issues/25526