Loading...
Loading...
Build, install, and test Expo/React Native apps on simulators and physical devices. Use when asked to "run on simulator", "install on device", "test on phone", "run detox", "preview build", or "build and test".
npx skill4agent add jonmumm/skills expo-testingapp.config.jsapp.config.tsapp.jsonexpo.ios.bundleIdentifiereas.json.detoxrc.jsdetox.config.jsapp.config.jsexpo.schemebun.lockbpnpm-lock.yamlyarn.lock1. Prebuild (if native code changed)
npx expo prebuild --platform ios --clean
2. Build for simulator
xcodebuild -workspace ios/<AppName>.xcworkspace \
-scheme <AppName> \
-configuration Debug \
-sdk iphonesimulator \
-derivedDataPath ios/build
3. Install on booted simulator
xcrun simctl install booted ios/build/Build/Products/Debug-iphonesimulator/<AppName>.app
4. Launch
xcrun simctl launch booted <bundleId>ios/package.jsonapp.config.jsapp.json*.podspecPodfilenpx expo run:ios --device1. Build
eas build --profile preview --platform ios
2. Download and install
# EAS provides a QR code / install link
# Or download .ipa and install via Finder/Apple Configuratoreas device:create
# Follow the URL to register the device's UDID# Full suite
npx detox test --configuration ios.sim.debug
# Specific test file
npx detox test --configuration ios.sim.debug e2e/<testFile>.e2e.ts
# With screenshots on failure (default Detox behavior)
# Artifacts saved to artifacts/ directorynpx detox build --configuration ios.sim.debug --if-missingtestIDawait device.disableSynchronization();
// interact with animated screen
await device.enableSynchronization();expo.schemeawait device.openURL({ url: '<scheme>://e2e' });// In Detox tests
await device.takeScreenshot('descriptive-name');.detoxrc.js.gitignorexcrun simctl io booted screenshot screenshots/<name>.png.dogfooding/.dogfooding/
screenshots/
findings.md
logs/xcrun simctl spawn booted log stream --level error# Create a named simulator for this agent
xcrun simctl create "Swarm-1" "iPhone 16"
# Returns a UDID like: 4A2B3C4D-5E6F-7890-ABCD-EF1234567890
# Boot it
xcrun simctl boot <UDID>
# Build and install targeting that specific simulator
xcrun simctl install <UDID> ios/build/Build/Products/Debug-iphonesimulator/<AppName>.app
xcrun simctl launch <UDID> <bundleId>.detoxrc.jsdevices: {
simulator: {
type: 'ios.simulator',
device: { type: 'iPhone 16', name: 'Swarm-1' }
}
}xcrun simctl delete <UDID>| Problem | Fix |
|---|---|
| Run |
| Build fails after adding package | |
| Simulator not found | |
| Detox timeout | Increase timeout in |
| EAS build queue slow | Use local builds for simulator testing, EAS for device sharing |
| Check the .app path — Debug vs Release, simulator vs device |