Why Device and Simulator Bugs Are Different Problems
The iOS simulator and Android emulator are fast and convenient development tools, but they are not identical to a real device. Three categories of differences account for most device-only bugs.
- Native modules: some React Native libraries have device-specific behavior that the simulator does not replicate. Camera, biometrics, NFC, and Bluetooth APIs often fall into this category.
- Permissions: the simulator often grants permissions automatically or handles them differently than a real device. A camera permission flow that works in the simulator may crash on device if the permission request is not implemented correctly for the OS version.
- Network conditions: simulators typically share the host computer's network connection. Real devices on cellular or a different WiFi network encounter different latency, NAT behavior, and CORS environments.
Step One: Read the Device Logs
The Metro bundler captures device logs in real time while your app is running on a connected device. These logs include JavaScript errors, console output, and native module messages. They are your first and most important debugging tool.
- Connect your device to your Mac with a USB cable.
- Run `npx expo start` in your project directory.
- Press 'a' for Android or 'i' for iOS to open the app on the connected device.
- Reproduce the bug. Watch the terminal window for red error messages.
- Copy the full error including the stack trace - not just the first line.
Step Two: Give Claude Code the Full Error
Most Expo device bugs are fixable in one to three turns with Claude Code if you give it the right input. The right input is the full error from the logs - not a description of what you think happened, but the actual error string, the file path it references, and the stack trace.
A prompt that works: 'My Expo app crashes on a real iPhone but not in the simulator. Here is the error from the Metro logs: [paste the full error]. The crash happens when I [describe the action]. Please explain what is causing this and fix it.' Claude Code can usually identify the root cause from the error alone and propose a targeted fix.
Common Device-Only Bug Patterns and Their Fixes
Device-only bug patterns and starting points
| Symptom | Likely Cause | Starting Fix |
|---|---|---|
| App crashes on launch only on device | A native module initializing incorrectly | Check if a permissions declaration is missing in app.json or Info.plist |
| Feature works in simulator, fails on device | Device-specific native API behavior | Test with console.log before and after the API call to isolate where it fails |
| Network request works in simulator, fails on device | Different network environment or CORS | Log the exact request URL and response status on device - the device may be hitting a different endpoint |
| App crashes after a few minutes of use on device | Memory pressure on real hardware | Reduce image sizes and check for event listener memory leaks |
| Permissions prompt never appears on device | Permission not declared in app.json | Add the required permission declaration and rebuild the app |
When You Cannot Reproduce the Bug on a Connected Device
Some device bugs are intermittent or only occur in production builds, not in development. If you cannot reproduce the bug on a connected device in development mode, the next step is to create a development build using EAS Build - a production-equivalent binary that still shows console logs.
Claude Code can set up the EAS Build configuration if you have not used it yet. Ask it to configure a development build profile in eas.json and give it the result of running `eas build:configure`. A development build gets you closer to production behavior while still giving you readable stack traces. Join the App Store Launch Club at appstorelaunchclub.com for $9/month for the full Claude Code and Expo workflow.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
Does Claude Code know about Expo-specific APIs?
Yes. Claude Code has strong knowledge of the Expo SDK, Expo Router, EAS Build, and common React Native libraries. When asking it to fix a device bug, mention that the project uses Expo rather than bare React Native so it applies the right context and avoids suggesting native fixes that require ejecting.
My app works in Expo Go but breaks in the production build - why?
Expo Go includes its own set of pre-built native modules. A production build only includes the modules configured in your app.json. If your production build is missing a behavior that works in Expo Go, check whether the relevant library is properly configured in app.json and included in your dependencies.
How do I view crash logs from a deployed app on a real iPhone?
For a deployed app not running through Expo's dev tools, you can connect the iPhone to a Mac and use the Devices window in Xcode to view crash logs. For production monitoring, consider adding a crash reporting library like Sentry to your app - it captures device crashes with stack traces and sends them to a dashboard you can access from any browser.
Where can I learn more about shipping Expo apps with Claude Code?
The App Store Launch Club covers the full build pipeline - from first line of code to shipped app - using Claude Code and Expo. Join at appstorelaunchclub.com for $9/month.
Last reviewed by David on August 4, 2026


