run-on-simulator
Build the Kwartje iOS app, run it on a local iOS Simulator through Metro with the dev auth bypass, and verify it (logs + screenshot). Use to see a change working in the real app, after native/dependen
Files2
View on GitHubSKILL.md.claude/skills/run-on-simulator/SKILL.md
GitHubRun on simulator
The app lives in apps/mobile (bundle id nl.kwartje.app, scheme kwartje). apps/mobile/ios/ is generated and gitignored — never edit it; change app.json / app.config.ts, then prebuild.
0. Preflight
- Disk:
df -h /System/Volumes/Data. A clean build needs ~7 GB free, an incremental one ~3 GB. If short, say what is big (DerivedData, simulator data) and ask before deleting anything. - Device:
xcrun simctl list devices booted; boot one withxcrun simctl boot <UDID>if needed. - Local backend: the dev auth bypass signs in to the local Supabase (
docs/24§2), sosupabase statusmust show it running (supabase start, thenpnpm db:resetfor fixtures). Never point the bypass at a remote project. - CocoaPods needs
export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8.
1. Prebuild (only when native inputs changed)
Native inputs: native deps in apps/mobile/package.json, app.json/app.config.ts, an Expo SDK bump.
pnpm --filter @kwartje/mobile exec expo prebuild -p ios (--clean only for stale native code).
2. Metro (background, log to the scratchpad)
pnpm dev > <scratch>/metro.log 2>&1 — needs EXPO_PUBLIC_ENV=development and EXPO_PUBLIC_SKIP_AUTH=1 (set in .claude/settings.json env). Never print .env* values.
3. Build + install (background)
MIN_FREE_KB=300000 UDID=<UDID> zsh .claude/skills/run-on-simulator/build-with-watchdog.sh <scratch>/ios-build.log
It runs expo run:ios --device <UDID> --no-bundler in apps/mobile and stops xcodebuild if free disk drops below the limit. Success = Build Succeeded + Installing in the log; a simctl openurl … code: 60 timeout afterwards is harmless.
4. Open
xcrun simctl launch <UDID> nl.kwartje.app. The app should land on Vandaag with fixture data and the persistent dev banner, no login screen (CLAUDE.md §8). A login screen means the bypass guard failed — check the four conditions, do not work around them.
5. Verify
- Wait for
iOS Bundledinmetro.log, then grep it forERROR. - Native errors:
xcrun simctl spawn <UDID> log show --last 3m --style compact --predicate 'process == "Kwartje" AND (messageType == error OR messageType == fault)'. Drop lines with tokens/keys before showing them. - Screenshot and exercise the changed screen: loading, empty, error, offline, stale, success; light + dark (
xcrun simctl ui <UDID> appearance dark); large text (xcrun simctl ui <UDID> content_size accessibility-extra-extra-extra-large). - Use the dev tools from
docs/24§3 (date override, forced states, user switcher) instead of editing code to reach a state.
6. Report (≤ 5 lines)
Build result · what was exercised · errors/new warnings · what was not covered (Android, Release build, real bank). Stop Metro unless asked to keep it.