First Run
How to build and run your app for the first time
First Run
Now that you have configured your environment and integrated your tools (Supabase, Firebase, RevenueCat), it's time to run the app.
Important: Because this boilerplate uses native libraries (Firebase, RevenueCat, etc.), you cannot use the standard "Expo Go" app from the App Store. You must create a Development Build.
1. Run a Development Build
You only need to do this once (or whenever you add new npm packages with native code).
Run on iOS Simulator
In a new terminal window, run:
npx expo run:iosWhat this does:
- Runs
prebuildto generate theiosdirectory. - Installs CocoaPods.
- Builds the app using Xcode.
- Installs the "Development Build" app on your Simulator.
- Starts the app and connects to your local Metro server.
Tip: If the build fails, try running npx expo prebuild --clean first to reset your native folders.
Run on Android Emulator
In a new terminal window, run:
npx expo run:androidWhat this does:
- Runs
prebuildto generate theandroiddirectory. - Builds the app using Gradle.
- Installs the "Development Build" app on your Emulator.
- Starts the app and connects to your local Metro server.
Tip: Ensure your Android Emulator is running before executing this command.
3. Daily Development
Once the Development Build is installed on your simulator/emulator, you don't need to rebuild native code every time.
For daily work:
Start the server: npx expo run:ios or npx expo run:android
Rebuild ONLY if:
- You install a new library (
yarn add or npx expo install ...) that has native code. - You change
app.json/app.config.ts. - You update native assets (icons, splash screens).
Troubleshooting
"CocoaPods not installed" or "pod install failed"
Ensure you have set up your iOS Environment correctly.
Try cd ios && pod install && cd .. manually to see the specific error.
"SDK location not found" (Android)
Ensure your ANDROID_HOME environment variable is set correctly in your shell profile (.zshrc or .bashrc).
"Config Error" or "Prebuild failed"
Run the cleanup command to regenerate native folders:
npx expo prebuild --clean