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
Enable Developer Mode
Open your project in Xcode
Select your device
Configure signing
- Select your app target
- Go to Signing & Capabilities
- Check “Automatically manage signing”
- Select your Team (your Apple ID)
Build and run
Cmd + R.Or from command line:Trust the developer certificate
On first launch, you’ll see “Untrusted Developer”:Open Settings on your device
Trust your Apple ID
Launch the app again
Running on specific iOS devices
List available devices:Wireless debugging (iOS)
Debug without a cable:Connect via USB initially
Enable network debugging
Disconnect cable
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
- 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
Verify connection
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
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:Connect via USB first
adb devices shows itEnable TCP/IP mode
Find device IP address
Connect wirelessly
Disconnect USB and verify
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
Performance profiling on devices
React DevTools Profiler
Profile component render performance:Install React DevTools
Run React DevTools
Connect your app
Use Profiler
Native profiling
- iOS (Instruments)
- Android (Profiler)
- 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
- Open Xcode
- Select your project → Target
- Go to Signing & Capabilities
- Enable “Automatically manage signing”
- Select your Team
iOS: Untrusted Developer
iOS: Untrusted Developer
- Go to Settings → General → VPN & Device Management
- Tap your developer certificate
- Tap Trust
Android: Device not detected
Android: Device not detected
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
- 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
- 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
Android Internal Testing
iOS App Store
Google Play Store
Next steps
Test on multiple devices
Profile performance
Test device features
Prepare for release