In a real app
The command to know is npx expo prebuild --clean: it deletes the existing native folders before regenerating, which the docs recommend as the safest option. Without --clean, prebuild tries to merge with what is there, and a forgotten manual edit can survive or break things. --platform ios limits it to one platform, --no-install skips dependency installation. npx expo run:ios and run:android run prebuild on their own when the folders are missing, then reuse them as-is.
The classic pitfall: someone edits ios/Podfile or AndroidManifest.xml directly to unblock a build, it works, and six weeks later a prebuild --clean or an EAS build wipes the change. Every native change has to live in app.json or in a config plugin, including SDK version settings through expo-build-properties. If the native folders are committed, that has to be a deliberate, documented decision, because EAS Build then stops regenerating anything.
In an audit I check whether android and ios are git-ignored, whether prebuild --clean runs without errors on a fresh clone, and whether the diff between the generated project and the committed one is empty. A non-empty diff is a list of uncaptured native changes that need to become plugins.
Related terms
Config plugin
A JavaScript function declared in app.json that modifies the native projects prebuild generates (Info.plist, manifest, Gradle, Podfile).
Expo
The open-source framework React Native recommends: a native module SDK, a CLI, prebuild, Expo Router, and the EAS cloud services.
EAS Build
Expo’s hosted build service: profiles in eas.json, credentials management, and macOS and Linux runners for iOS and Android.
Autolinking
The mechanism that discovers native libraries in node_modules and adds them to the Podfile and Gradle with no manual edits.
Development build
A debug build of your own app that includes expo-dev-client: your native modules, plus a launcher to connect to Metro.