This guide explains how to test the Loop app on a real iPhone/iPad device for development and debugging, which is required for testing camera functionality.
The iOS Simulator has limitations:
- ❌ Camera does not work - CameraView will show a black screen
- ❌ No access to device sensors (accelerometer, gyroscope)
- ❌ Different performance characteristics
- ✅ Real device testing is required for camera features
- Mac with Xcode installed
- iPhone or iPad with iOS 13.0 or later
- USB cable to connect device to Mac
- Apple ID (free developer account works)
- Connect your iPhone to your Mac via USB
- On your iPhone, you'll see a prompt: "Trust This Computer?"
- Tap Trust and enter your device passcode
- Open Xcode (if not installed:
xcode-select --install) - Go to Window → Devices and Simulators
- Select your device from the left sidebar
- If prompted, click "Use for Development"
- Your device should show as "Connected"
-
Open the iOS project in Xcode:
open ios/Loop.xcworkspace
-
Select the Loop project in the left sidebar
-
Select the Loop target
-
Go to Signing & Capabilities tab
-
Check "Automatically manage signing"
-
Select your Team (your Apple ID)
- If you don't see a team, click "Add Account" and sign in with your Apple ID
-
Xcode will automatically create a provisioning profile
# List available devices
npx expo run:ios --device
# Or specify device by name
npx expo run:ios --device "Your iPhone Name"The app will:
- Build the native iOS app
- Install it on your device
- Launch automatically
- Start Metro bundler for hot reloading
-
Open the workspace:
open ios/Loop.xcworkspace
-
Select your device from the device dropdown (top toolbar)
-
Click the Play button (
▶️ ) or pressCmd + R -
In a separate terminal, start Metro:
npx expo start
Option 1: Xcode Console
- Open Xcode
- Go to Window → Devices and Simulators
- Select your device
- Click "Open Console" button
- Filter by "Loop" to see your app's logs
Option 2: React Native Debugger
- Shake your device to open the developer menu
- Tap "Debug" to connect to Chrome DevTools
- Open Chrome and go to
chrome://inspect
Option 3: Terminal Logs
# View all device logs
xcrun simctl spawn booted log stream --predicate 'processImagePath contains "Loop"'
# Or use React Native CLI
npx react-native log-iosIf you see "Developer Mode Required":
- Go to Settings → Privacy & Security
- Scroll down to Developer Mode
- Toggle it ON
- Restart your iPhone
- Confirm when prompted
Once the app is running on your device:
- Shake device to open developer menu
- Enable "Fast Refresh" for automatic reloading
- Or press
Cmd + Din terminal to reload manually
- Build and run on device using steps above
- Navigate to the camera screen in the app
- Grant camera permissions when prompted
- You should see the live camera preview 📸
- Test taking pictures and AI recognition
Problem: App won't open, shows "Untrusted Enterprise Developer"
Solution:
- Go to Settings → General → VPN & Device Management
- Find your Apple ID under Developer App
- Tap Trust "[Your Apple ID]"
- Confirm by tapping Trust
Problem: Xcode can't launch the app
Solution:
- Disconnect and reconnect your device
- Clean build folder:
Cmd + Shift + Kin Xcode - Delete app from device and rebuild
- Restart Xcode
Problem: Expo can't find your device
Solution:
# Check if device is connected
xcrun xctrace list devices
# If not listed, try:
# 1. Unplug and replug USB cable
# 2. Unlock your device
# 3. Trust the computer againProblem: "Code signing is required"
Solution:
- Open
ios/Loop.xcworkspacein Xcode - Select Loop target
- Go to Signing & Capabilities
- Change Bundle Identifier to something unique:
- Example:
com.yourname.loop
- Example:
- Select your Team
- Clean and rebuild
Problem: App shows "Unable to connect to Metro"
Solution:
- Ensure Mac and iPhone are on the same WiFi network
- Check firewall isn't blocking port 8081
- Manually enter Metro URL:
- Shake device → Settings
- Enter your Mac's IP:
http://192.168.x.x:8081
# Skip bundling if only native code changed
npx expo run:ios --device --no-bundler
# Then start bundler separately
npx expo start# Build release version for better performance
npx expo run:ios --device --configuration ReleaseAfter initial USB setup, you can debug wirelessly:
- Connect device via USB
- Open Xcode → Window → Devices and Simulators
- Select your device
- Check "Connect via network"
- Wait for network icon to appear
- Disconnect USB cable
- Device should stay connected over WiFi
- Test all app features on the device
- Check performance and responsiveness
- Test camera, permissions, and native features
- Use Xcode Instruments for performance profiling