Running the App
Overview
Learn how to run and test your app on different platforms during development.
Quick Start
Start Development Server
bash
npm startThis opens Expo DevTools with options to run on different platforms.
Running on Specific Platforms
iOS Simulator (Mac Only)
bash
npm run iosRequirements:
- macOS computer
- Xcode installed
- iOS Simulator set up
Android Emulator
bash
npm run androidRequirements:
- Android Studio installed
- Android Emulator configured
- At least one virtual device created
Web Browser
bash
npm run webOpens the app in your default browser.
Physical Device
Install Expo Go app on your phone
Start the development server:
bashnpm startScan the QR code with:
- iOS: Camera app
- Android: Expo Go app
Development Commands
Clear Cache and Start
bash
npm start -- --clearStart with Specific Port
bash
npm start -- --port 8082Start in Tunnel Mode (for remote testing)
bash
npm start -- --tunnelHot Reload
The app automatically reloads when you save changes:
- Hot Reload: Updates without losing state
- Full Reload: Shake device or press
rin terminal
Debugging
Open Developer Menu
- iOS Simulator: Cmd + D
- Android Emulator: Cmd + M (Mac) or Ctrl + M (Windows)
- Physical Device: Shake the device
Developer Menu Options
- Reload: Refresh the app
- Debug Remote JS: Open Chrome DevTools
- Toggle Inspector: Inspect UI elements
- Show Perf Monitor: View performance metrics
Console Logs
View logs in the terminal where you ran npm start.
typescript
console.log('Debug message');
console.warn('Warning message');
console.error('Error message');Platform-Specific Testing
iOS Testing Checklist
- [ ] Test on different iPhone sizes
- [ ] Test landscape orientation
- [ ] Test dark mode
- [ ] Test with VoiceOver (accessibility)
- [ ] Test push notifications
Android Testing Checklist
- [ ] Test on different screen sizes
- [ ] Test landscape orientation
- [ ] Test dark mode
- [ ] Test with TalkBack (accessibility)
- [ ] Test back button behavior
Common Issues
"Could not find a development server"
bash
# Kill existing processes
npm start -- --clear"Metro bundler took too long"
bash
# Clear cache and restart
rm -rf node_modules/.cache
npm start -- --clear"Module not found"
bash
rm -rf node_modules
npm install
npm start -- --clearPort Already in Use
bash
# Use a different port
npm start -- --port 8082iOS Simulator Not Opening
bash
# Reset simulator
xcrun simctl shutdown all
npm run iosAndroid Emulator Not Starting
- Open Android Studio
- Go to Device Manager
- Start an emulator manually
- Then run
npm run android
Performance Tips
Use Release Mode for Performance Testing
bashnpx expo start --no-devEnable Hermes (enabled by default in Expo SDK 54+)
Profile the App
- Open Developer Menu
- Select "Show Perf Monitor"
Need Help?
- Check the Troubleshooting Guide
- Read the Development Guide
- Contact support for assistance
