Make sure you’ve completed the environment setup and can run your app in simulators before deploying to devices.
iOS devices
Prerequisites
- Mac with Xcode installed
- Apple Developer account (free accounts can deploy to devices for 7 days)
- Physical iOS device with USB cable
- iOS 15.1 or newer on your device
Setup steps
Connect your device
Connect your iOS device to your Mac via USB cable. If prompted on your device, tap “Trust This Computer”.
Enable Developer Mode
On iOS 16+, go to Settings → Privacy & Security → Developer Mode and enable it. Your device will restart.
Select your device
In Xcode, click the device dropdown near the top-left and select your connected iPhone from the list.
Configure signing
Select your project in the navigator, then:
- Select your app target
- Go to Signing & Capabilities
- Check “Automatically manage signing”
- Select your Team (your Apple ID)
Trust the developer certificate
On first launch, you’ll see “Untrusted Developer”:Free Apple Developer accounts require you to re-sign apps every 7 days. Paid accounts ($99/year) allow apps to stay installed for a year.
Running on specific iOS devices
List available devices:Wireless debugging (iOS)
Debug without a cable:Enable network debugging
In Xcode, go to Window → Devices and SimulatorsSelect your device, check “Connect via network”
Your Mac and iOS device must be on the same Wi-Fi network for wireless debugging.
Android devices
Prerequisites
- Android device with USB debugging enabled
- Android 7.0 (API 24) or newer
- USB cable
- Android SDK Platform Tools (adb)
Enable USB debugging
Enable Developer Options
On your Android device:
- Go to Settings → About Phone
- Tap Build Number 7 times
- You’ll see “You are now a developer!”
Enable USB Debugging
- Go to Settings → System → Developer Options
- Enable USB Debugging
- (Optional) Enable Install via USB for faster installs
Connect your device
Connect your Android device via USB cable. Your device will prompt you to allow USB debugging - tap Allow.
Build and run
With your device connected and Metro running:Connecting to development server
Your device needs to connect to the Metro bundler on your computer:- Via USB (Recommended)
- Via Wi-Fi
Use reverse port forwarding:This makes port 8081 on your device map to port 8081 on your computer. Metro will work automatically.
Running release builds
Test the production version of your app:- Are optimized and minified
- Have JavaScript bundle included
- Don’t connect to Metro
- Run at production performance
Wireless debugging (Android)
Debug over Wi-Fi without USB:
To revert to USB mode:
Testing device-specific features
Once running on device, you can test features unavailable in emulators:Camera
GPS/Location
Push Notifications
Sensors
Developer menu on devices
iOS
Open the developer menu by:- Shaking your device
- Three-finger tap (if shake doesn’t work)
Android
Open the developer menu by:- Shaking your device
- Running
adb shell input keyevent 82 - Using hardware menu button (older devices)
Developer menu options
- Reload
- Debug
- Enable Fast Refresh
- Settings
- Show Inspector
Reload JavaScript bundle (same as pressing R twice in Metro)
Performance profiling on devices
React DevTools Profiler
Profile component render performance:Native profiling
- iOS (Instruments)
- Android (Profiler)
Profile native iOS performance:
- In Xcode, select Product → Profile (Cmd + I)
- Choose a template:
- Time Profiler: CPU usage
- Allocations: Memory usage
- Network: Network activity
- Click record and interact with your app
Troubleshooting
iOS: Code signing error
iOS: Code signing error
Error: “Code signing is required for product type ‘Application’”Solution:
- Open Xcode
- Select your project → Target
- Go to Signing & Capabilities
- Enable “Automatically manage signing”
- Select your Team
iOS: Untrusted Developer
iOS: Untrusted Developer
Error: “Untrusted Developer” when launchingSolution:
- Go to Settings → General → VPN & Device Management
- Tap your developer certificate
- Tap Trust
Android: Device not detected
Android: Device not detected
Issue:
adb devices shows no devicesSolutions:- Ensure USB debugging is enabled
- Try a different USB cable (some are charge-only)
- Install device-specific USB drivers (Windows)
- Run
adb kill-serverthenadb start-server - Check USB connection mode (should be File Transfer/MTP)
Android: Can't connect to Metro
Android: Can't connect to Metro
Error: “Could not connect to development server”Solutions:
- Set up reverse port forwarding:
- Or configure device’s IP manually in developer menu
- Ensure both computer and device are on same network
- Check firewall isn’t blocking port 8081
Red screen on device but works on emulator
Red screen on device but works on emulator
Possible causes:
- Network configuration issues
- Missing native dependencies
- Platform-specific code errors
- Check error message details
- Test with release build:
--mode release - Review platform-specific code with
Platform.OS
Building for distribution
Once you’re ready to share your app:iOS TestFlight
Distribute beta builds to testers via TestFlight
Android Internal Testing
Use Google Play Console for internal testing
iOS App Store
Submit your app to the Apple App Store
Google Play Store
Publish to Google Play Store