Should I exclude `ios`?

Hi @orome

expo run:* has the unfortunate (in my opinion) side effect of basically turning your app into a bare workflow app.

Because the Expo Team has done an amazing job of supporting normal React Native apps this is not a huge problem, but it means you have a few options for what you can/should do:

  • You could switch back to the managed workflow by reverting the changes made by expo run, including removing the android and ios directories entirely and optionally reverting changes to .gitignore, package.json, package-lock.json/yarn.lock and removing index.js and metro.config.js (unless you created them yourself). This is what I do. See also expo.fyi/prebuild-cleanup
  • You could stay with the bare workflow and refresh the native code with expo prebuild --clean as needed (e.g. after making changes to app.json). With this option you would add android and ios to .gitignore
  • You could just stick to the bare workflow like a normal React Native app and manually make changes to the android/ios directories as needed. With this option you would commit android and ios

EDIT: I generally avoid expo run. If I want to build locally I do it with eas build --local, which does not make changes to your app. I do sometimes run expo prebuild to test a config plugin, but I then revert all of the changes and make sure not to commit them.

3 Likes