Skip to content

feat(ipod): the generic iPod runtime keeps every game's screen awake - #567

Merged
doodlewind merged 1 commit into
mainfrom
fix/ipod-runtime-keep-awake
Oct 6, 2026
Merged

doodlewind merged 1 commit into
mainfrom
fix/ipod-runtime-keep-awake

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

What

Evan's decision for Studio games on the iPod touch 4: they keep the screen awake. The generic iPod runtime (bun tools/runtime.ts ipod, #564) now compiles hosts/ios-legacy/runtime.c with POCKET_KEEP_AWAKE, the switch a first-party app's keepAwake descriptor sets: launch_application calls setIdleTimerDisabled:YES for the app's lifetime. The docs table in docs/IPODTOUCH4.md says so; tests/ipodtouch4-profile.test.ts pins the define in the runtime build.

Device results (iPod4,1, iOS 6.1.6 10B500, UDID 68dbced5…, AppSync Unified; ipodtouch4:<udid> lease)

Repack check on main (efb39e90, before this change), runtime build 70f432a0…:

  • bun tests/e2e/ipod-repack.ts --manifest twenty48-remix/pocket.json --id dev.pocket-nexus.studio.twenty48-remix --title "Twenty48 Remix" … --device: 2.2 MB .pocket, 1,117,720-byte .ipa repacked in 133 ms; deploy --ipa installed it through AppSync with byte-exact readback of every bundle file, launch reported state=running renderer=gles1 640x960@2, first frame captured; whole run 23.6 s.
  • AppSync accepted the bundle signed once for every game: the executable's ad hoc signature (identifier PocketJSRuntime, Info.plist not bound, no sealed resources) under another file name, Info.plist, icons and app.pocket.
  • Played with injected HID touches (a scratch IOHIDEventSystemClient helper, not committed): a tap on "Tap to start" started the game (last_touch_hit 39), five swipes slid tiles to score 20; the status record counted 6 completed touch sequences, 60 frames per second window, 0.4 ms guest+core per frame, 2.8 ms present.
  • Missing and refused games, on a throwaway bundle id that was uninstalled afterwards: without app.pocket the status record says state=failed error=this app carries no game: app.pocket is missing renderer=software; with a damaged footer, app.pocket is not a ipodtouch4-dev ABI 8 game (error 4). The process stayed alive in both and HOME left it.
  • Before this change the game stopped drawing about 58 s after launch (frame 3481): the iPod's auto-lock.

With this change (runtime build c722c410…), the same game installed and launched, then left untouched for 150 s: at 03:21 the status record still advanced (frame 10081, 0 touch sequences) and the capture returned the live frame.

🤖 Generated with Claude Code

The runtime build compiles hosts/ios-legacy/runtime.c with POCKET_KEEP_AWAKE,
the switch a first-party app's keepAwake descriptor sets: the app disables
iOS's idle timer for its lifetime, so a repacked Studio game stays on screen
without a touch each auto-lock interval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doodlewind
doodlewind merged commit 2c56042 into main Oct 6, 2026
5 checks passed
@doodlewind
doodlewind deleted the fix/ipod-runtime-keep-awake branch October 6, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant