Building for iOS Simulator
Step 1: Generate the Bundle File
Navigate to your React Native project and generate the iOS bundle:Step 2: Open Your Project in Xcode
-
Launch Xcode and open your app’s workspace:
- Wait for Xcode to finish loading and indexing your project
Step 3: Build the .app File
- In Xcode, select any iOS Simulator as your destination
- Build your project: Product > Build (⌘+B)
- Locate your build at:
ios/build/Build/Products/Debug-iphonesimulator/YourApp.app
Step 4: Validate Your Build
- Open iOS Simulator
- Drag your
.app
file onto the simulator - Launch the app to verify it works correctly
Building for Android Emulator
Step 1: Create Assets Directory
Ensure the assets directory exists:Step 2: Generate the Bundle File
Generate the Android bundle and assets:Step 3: Build the APK File
Navigate to the Android directory and build:Step 4: Locate Your APK
The resulting APK will be at:android/app/build/outputs/apk/debug/app-debug.apk
Step 5: Validate Your Build
- Start your Android emulator
- Install the APK:
adb install app/build/outputs/apk/debug/app-debug.apk
- Launch the app from the emulator to verify functionality
Troubleshooting
Bundle generation fails
Bundle generation fails
iOS build fails with signing errors
iOS build fails with signing errors
For simulator builds, code signing is usually not required:
- Set Code Signing Identity to “Don’t Code Sign” in Build Settings
- Or enable Automatically manage signing if you have a developer account
iOS dependencies missing
iOS dependencies missing
Android Gradle build fails
Android Gradle build fails
Assets not found in Android build
Assets not found in Android build
Ensure the assets directory exists and bundle command ran successfully:
Next Steps
Once you have your build files:- iOS: Locate your
.app
file inios/build/Build/Products/Debug-iphonesimulator/
- Android: Locate your
.apk
file inandroid/app/build/outputs/apk/debug/
- Proceed to Uploading your app