2.2 KiB
iOS Build Guide for Expo
This project uses the Expo Managed Workflow, which means the ios and android native directories are generated automatically via Continuous Native Generation (CNG). You should not see or manually edit an ios folder in your project root.
1. Development (Expo Go)
The easiest way to build/run for iOS during development is using the Expo Go app on your iPhone.
- Install Expo Go from the App Store.
- Run the development server:
npx expo start - Scan the QR code with your Camera app to open the project in Expo Go.
2. Local Native Development (Prebuild)
If you need to test native modules, use a custom dev client, or specifically need the ios folder for debugging in Xcode:
-
Generate the native directories:
npx expo prebuildThis will create the
iosandandroidfolders based on yourapp.jsonconfiguration. -
Run on the iOS Simulator (requires macOS + Xcode):
npx expo run:ios
Warning
The
iosfolder is typically gitignored. In the managed workflow, any changes you make manually in theiosfolder may be overwritten the next time you runprebuild. Always useapp.jsonor config plugins for permanent configuration.
3. Production Builds (EAS Build)
To build a .ipa file for TestFlight or the App Store, the recommended way is using Expo Application Services (EAS).
- Install EAS CLI:
npm install -g eas-cli - Log in to your Expo account:
eas login - Configure the project (run once):
eas build:configure - Run a build for iOS:
EAS will handle certificates, provisioning profiles, and building on their servers (no macOS/Xcode required locally).eas build --platform ios
Summary of Commands
| Goal | Command |
|---|---|
| Start Dev Server | npx expo start |
| Generate iOS Folder | npx expo prebuild |
| Run on iOS Simulator | npx expo run:ios |
| Build for Production | eas build --platform ios |