MOBILE_DEV_TIPS
Mobile Development Tips & Tricks
Keyboard Shortcuts
Android Emulator
Cmd+M/Ctrl+M- Open dev menuCmd+R/Ctrl+R- Reload (from dev menu)Cmd+D/Ctrl+D- Toggle debug mode
iOS Simulator
Cmd+R- Reload appCmd+K- Toggle keyboardCmd+Shift+H- Home buttonCmd+Shift+H+H- App switcher
Fast Development Workflow
-
First time setup:
npm run dev:mobile -- --platform=android --config=auravantbeta- Wait for Android Studio/Xcode to open
- Click "Run" once
- Keep IDE open
-
Make changes:
- Edit code in your editor
- Save file
- App reloads automatically (2-5 seconds)
-
If auto-reload fails:
- Press
Cmd+M→ Reload (Android) - Press
Cmd+R(iOS)
- Press
Performance Tips
Faster Rebuilds
- Only edit files in
src/- native changes require full rebuild - Use
eval-source-mapfor faster webpack builds (already configured) - Close unused apps to free memory
Network Issues
- Ensure device and computer are on same WiFi
- Check firewall allows port 8080
- Use USB debugging if WiFi is unstable
Memory Management
- Restart emulator if it becomes slow
- Close other Android Studio/Xcode projects
- Use
npm run build:mobilefor final testing
Common Issues
"Cannot connect to dev server"
# Check your local IP
ifconfig | grep "inet " | grep -v 127.0.0.1
# Verify webpack is running
curl http://YOUR_IP:8080
# Restart with fresh config
Ctrl+C
npm run dev:mobile -- --platform=android --config=auravantbeta
"App crashes on launch"
# Clear app data
adb shell pm clear com.auravantbeta # Android
xcrun simctl uninstall booted com.auravantbeta # iOS
# Reinstall
npx cap sync android
npx cap sync ios
"Changes not reflecting"
- Check webpack console for errors
- Hard refresh:
Cmd+M→ Reload - Clear cache and restart:
rm -rf node_modules/.cache
npm start
"Module not found after adding dependency"
# Stop dev server (Ctrl+C)
npm install
npx cap sync android # or ios
npm run dev:mobile -- --platform=android
Pro Tips
Multiple Configs
Switch between configs without rebuilding:
# Development
npm run dev:mobile -- --platform=android --config=auravantbeta
# Testing another config
Ctrl+C
npm run dev:mobile -- --platform=android --config=ag
Specific Device
# List devices
npm run list:devices
# Target specific device
npm run dev:mobile -- --platform=android --device=emulator-5554
Debug Console
- Android:
adb logcat | grep -i "chromium" - iOS: Safari → Develop → Simulator → Your App
Quick Reset
# Full reset (if things are broken)
Ctrl+C # Stop dev server
rm -rf dist android/app/build ios/App/output
npm run dev:mobile -- --platform=android --config=auravantbeta
Comparison: Dev vs Build
| Action | Dev Mode | Build Mode |
|---|---|---|
| Initial setup | ~30s | ~5-10min |
| Code change | 2-5s | 5-10min |
| Asset change | 2-5s | 5-10min |
| Config change | 30s | 5-10min |
| Native change | Full rebuild | Full rebuild |
Best Practices
- Keep dev server running - Don't restart unless necessary
- Use version control - Commit before major changes
- Test on real device - Emulators don't catch everything
- Monitor console - Watch for errors in webpack output
- Clean builds periodically -
rm -rf distonce a day
Need Help?
- Check webpack console for build errors
- Check device console for runtime errors
- Verify
capacitor.config.jsonhas correct server URL - Ensure all dependencies are installed:
npm install