Repository navigation
Apple device lifecycle and permissions: thicket-device-apple, the galleries' Device section (#114) - #132
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ttle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rol 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
An unresolved active finding remains, namely a misplaced Scaladoc comment that no longer documents the generic checker adapter while leaving storageChecks undocumented.
1 open issue
What changed in this PR
This PR implements the Apple half of thicket-device (#114): app lifecycle and permissions on macOS and iOS. It adds a new thicket-device-apple module backed by its own Swift static library (libthicketdevice.a, carried in the jar like thicket-http-apple), wires AppleDevice() into both Apple galleries, and adds gallery self-tests that exercise the Device section through real platform notifications — including an XCUITest "tapper" to answer the iOS notifications alert headlessly. The surface follows the established shim-gen contract (ABI → C header → Scala externs → Swift), with a new DeviceAbi and DeviceConsistencySpec enforcing no drift.
Changes:
- New
thicket-device-applemodule:DeviceShim.swift(lifecycle via scene/occlusion notifications, permissions viaAVCaptureDevice/UNUserNotificationCenter, main-thread callback delivery),AppleDevice/AppleLifecycle/ApplePermissions, generatedDeviceShim.scala/thicket_device.h, andDeviceAbi+DeviceConsistencySpec. - Build/plumbing:
build.sbtmodule + packaging +platformsaggregate,ThicketNativeFlags.appleDevice,ThicketDeviceAppleunpack plugin,SharedFlagsSpec,.scalafmt.confexclusion. - Gallery + test harness:
GalleryDeviceChecks,GallerySelfTestterminate-hook verdict,run-ios-app.shdrive/EXTRA_LIBS/USAGE_STRINGS/FRESH_INSTALL/PRIVACY_GRANT,tapperXCUITest project,verify-apple.shstep, plus docs updates.
| File | Description |
|---|---|
tools/shim-gen/.../DeviceAbi.scala |
New thk_dev_* ABI (9 fns, own callback typedefs) |
tools/shim-gen/.../DeviceConsistencySpec.scala |
7 tests enforcing header/externs/Swift/ABI agreement |
tools/shim-gen/.../Parse.scala |
Skips self-defined typedef callback lines |
tools/shim-gen/.../Emit.scala, Main.scala |
Generate device header + Scala externs |
modules/device-apple/.../DeviceShim.swift |
Swift lib: lifecycle observers, permissions, main-thread delivery |
modules/device-apple/.../AppleDevice.scala, DeviceShim.scala |
Scala lifecycle/permissions + generated externs |
modules/device-apple/shim/* |
Header, build script, .gitignore |
tools/sbt-thicket/* |
appleDevice flags, unpack plugin, test |
build.sbt, .scalafmt.conf, bin/verify-apple.sh |
Module wiring, packaging, verify step |
examples/gallery/.../GalleryDeviceChecks.scala, GallerySelfTest.scala |
Device self-test checks + terminate-hook verdict |
examples/gallery/{macos,ios}/..., Gallery.scala |
Pass device = Some(AppleDevice()) |
examples/ios-host/{run-ios-app.sh,tapper/*}, gallery build-app.sh |
DRIVE harness + XCUITest tapper |
docs/*, README.mds |
Status/decision/release/doc updates |
The implementation is cohesive, closely mirrors the existing thicket-http-apple pattern, and is backed by measured controls. I noted one documentation issue: a storageChecks Scaladoc that the refactor left misattached to the new checker adapter in GallerySelfTest.scala. Note that much of this change is Apple-only native/FFI code whose runtime correctness can only be validated on a Mac/simulator, which this review environment cannot build or run.
Review effort: Balanced
…eview) The comment describing the storage checks had ended up above `checker`, a plain adapter, leaving storageChecks undocumented. It's back on storageChecks, and checker has its own line. docs/14's platforms list and the decision log keep both sides. Measured on the merge, "iPhone 18 Pro": bin/verify-apple.sh 17/17 (macOS gallery 195 x 2, iOS 191). getting-started failed once reading the sbt version under parallel load, and passed re-run alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A finding from #137 (#120, stacked on this PR), worth knowing before merging: on the merged branch, |
|
A likelier cause for the notifications flake above, measured by #138 (#118): on a just-booted simulator, |
One conflict, the decision log: both entries kept, #114's first. Measured: platforms/Test/compile clean; checkLinux exit 0 on the second run. The first run failed one effectZioJVM test (not identified: --error hid the name); effectZioJVM/testFull alone then passed 25/25, and the whole check passed on the rerun, so a timing flake under load, as #117's was. Apple self-tests not run here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides grew the Apple galleries: - GalleryIos/GalleryMac: Services get device, clipboard and haptics. - GallerySelfTest: storage -> device -> clipboard -> sheet -> big list, both check groups kept. - build.sbt: the Apple galleries depend on deviceApple, clipboardApple and hapticsApple. - verify-apple.sh's header, docs/12's Apple counts (the two measured apart; the combined run is the Mac's) and the decision log keep both. Measured: platforms/Test/compile clean (type-checks the Apple Scala). Not measured: the Apple self-tests on the combined gallery, which need the Mac. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides grew the Apple galleries: Services get device, motion, clipboard and haptics; the self-test runs storage -> device -> motion -> clipboard -> sheet -> big list; the Apple galleries depend on motionIos, clipboardApple and hapticsApple. Docs keep both sides (README, docs/12, 14, 16); the decision log's 2026-11-01 entry moved back to the top. Measured: platforms/Test/compile clean. #127 is Apple-only, so cc3ee5a's GTK (137) and Android (86) counts stand. Not measured: the Apple self-tests on the combined gallery (the Mac's). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides grew the Apple galleries: Services get device, location, clipboard and haptics; the self-test runs storage -> device -> location -> clipboard -> sheet -> big list; the Apple galleries depend on locationApple, clipboardApple and hapticsApple. docs/12, 14 and the decision log keep both sides; its 2026-11-01 entry moved back to the top. Measured: platforms/Test/compile clean. Shared gallery code is unchanged from 427494e but for #127's Apple-only additions. Not measured: the Apple self-tests on the combined gallery (the Mac's). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged 🤖 Generated with Claude Code |
…rged #132 merged as a squash, so this tree is main plus #138's own change, the difference from #132's final commit (5979dc2). One conflict, in the decision log: main's two new entries (camera preview, share) kept beside this PR's. The generated DeviceShim.scala and thicket_device.h were regenerated (14 thk_dev functions). Measured on the result, "iPhone 17e": bin/verify-apple.sh 17/17, macOS gallery 199 per run (twice), iOS gallery 202. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…macOS Location.unavailable (#118) (#138) * WIP #114: thicket-device-apple, its Swift library and the thk_dev ABI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: the Apple galleries' device checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: iOS DRIVE hooks, XCUITest tapper; iOS gallery 191/191 on iPhone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: verify-apple shim-device step, sbt-thicket thicketDeviceApple, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: docs, decision log, scalafmt exclude for the generated DeviceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: catch a leftover refusal (notYetAsked, failed DRIVE fails), settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: uninstall at the end of a fresh-install run instead of a settle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #114: macOS measured unlocked: gallery 195 (185 + 10), occlusion control 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: thicket-location-apple over CLLocationManager in libthicketdevice; gallery location checks Untested on the simulator yet. thk_dev_location_* (5 functions) in DeviceAbi; DeviceConsistencySpec 7/7. libthicketdevice.a 91 KB macOS / 92 KB simulator (43 / 46 KB before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: iOS gallery waits up to 6 min Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: iOS location self-test passes on iPhone Air, 199 checks (191 + 8) The background check records what the section shows while away: iOS suspends the app, so a 3 s timer set in the background never fired (the first runs timed out there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: docs 14, 16, the location, device and gallery READMEs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #118: decision log and docs/12: iOS gallery 199 (191 + 8), macOS 192 locked (191 + 1) Control: without WhileInFront's background stop, 1 FAIL (1 counted, 2 in libthicketdevice) while the on-screen check passes. Found: on a just-booted simulator getNotificationSettings exceeds the 5 s cap on 3 of 7 boots (with or without CoreLocation), read as Denied (#114). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #118: decision log: verify-apple.sh "iPhone Air" 17/17 on 2e2d61a Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #118: decision log: it was the first full run that failed getting-started Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apple device lifecycle and permissions: thicket-device-apple, the galleries' Device section (#114) (#132) * WIP #114: thicket-device-apple, its Swift library and the thk_dev ABI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: the Apple galleries' device checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: iOS DRIVE hooks, XCUITest tapper; iOS gallery 191/191 on iPhone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: verify-apple shim-device step, sbt-thicket thicketDeviceApple, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: docs, decision log, scalafmt exclude for the generated DeviceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: catch a leftover refusal (notYetAsked, failed DRIVE fails), settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: uninstall at the end of a fresh-install run instead of a settle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #114: macOS measured unlocked: gallery 195 (185 + 10), occlusion control 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Share: thicket-share and -android, files served by Thicket's own provider (#135) * Share: thicket-share and -android, files served by Thicket's own provider docs/16 §16.10 item 5, to the owner's decision of 2026-11-01: a framework ContentProvider the app declares in its manifest, not AndroidX's FileProvider. - thicket-share: Share.text, Share.file, availability; SharedFiles (copies served only from their own directory, with their type; pruned after a day); RecordingShare; Share.unavailable for GTK. - thicket-share-android: ACTION_SEND through the chooser. ThicketFileProvider, not exported, read-only, serves only <cache>/thicket-shared, under FLAG_GRANT_READ_URI_PERMISSION and the intent's ClipData. Undeclared, a file share throws naming the element. Measured: - checkLinux (with-keyring, 8 GB): exit 0; ShareSpec 5/5, JVM and Native. - GTK gallery 137 (136 + 1), todo 69, under a headless gnome-shell (desktop locked). - Android gallery 85/85 (81 + 4) on s2test: build.sh taps the gallery's own share target in the real chooser; text and file (name, type, bytes) arrive, and the provider logs com.android.intentresolver reading the file through the grant. Falsified: without the grant, the share sheet's read disappears and that check fails. Found: ART has no Files.writeString/readString; the first run threw NoSuchMethodError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Refactor sharing process with error handling Refactor sharing logic to use Try for error handling. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…as merged #132 merged as a squash and #138 (location) merged since. So this tree is main plus #137's own change, its difference from #132's final commit. Eight conflicts, each a location-beside-motion addition kept on both sides: the gallery's dependencies and services, the self-test chain (device, location, motion, clipboard), and the docs rows. Generated files regenerated (4 thk_mot functions). Measured on the result, "iPhone 17e": bin/verify-apple.sh 17 of 18, macOS gallery 200 per run and iOS 206 + 1 FAIL. The failure is #132's cold-boot notifications flake ("not yet asked" read as Denied). The iOS gallery re-run on the warm simulator: 207/207. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…navailable (#120) (#137) * WIP #114: thicket-device-apple, its Swift library and the thk_dev ABI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: the Apple galleries' device checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: iOS DRIVE hooks, XCUITest tapper; iOS gallery 191/191 on iPhone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: verify-apple shim-device step, sbt-thicket thicketDeviceApple, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: docs, decision log, scalafmt exclude for the generated DeviceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: catch a leftover refusal (notYetAsked, failed DRIVE fails), settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: uninstall at the end of a fresh-install run instead of a settle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #114: macOS measured unlocked: gallery 195 (185 + 10), occlusion control 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #120: thicket-motion-ios: MotionAbi (thk_mot_*, 4 functions), Swift over CMMotionManager, IosMotionProvider shimGen/testFull 37/37 (MotionConsistencySpec 7). libthicketmotion.a 15 056 bytes (ios-sim). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #120: the gallery's Motion section on Apple: IosMotion on iOS, Motion.unavailable on macOS, GalleryMotionChecks iOS gallery on iPhone 17e: 195 ok, 0 FAIL; the 5 motion checks pass (0 starts, nothing active). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #120: thicketMotionIos in sbt-thicket; MotionShim.scala excluded from scalafmt; formatted Controls on iPhone 17e: Motion.apply ignoring availability -> 1 FAIL (3 starts for 0 available). macOS gallery 196 ok (195 + 1 motion), unlocked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #120: docs: decision log, docs/09 §9.11, 12, 14, 16, motion README verify-apple.sh "iPhone 17e" on ef811a1: 18/18 (shim-motion new); iOS gallery 196, macOS 196 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #120: the verify-apple results in the decision log 18/18 on ef811a1; 17/18 twice on the merge 3f6ea69 (#114's leftover notifications refusal after a reboot; motion checks pass); iOS gallery alone 196, macOS 196 unlocked / 192 locked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apple device lifecycle and permissions: thicket-device-apple, the galleries' Device section (#114) (#132) * WIP #114: thicket-device-apple, its Swift library and the thk_dev ABI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: the Apple galleries' device checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: iOS DRIVE hooks, XCUITest tapper; iOS gallery 191/191 on iPhone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: verify-apple shim-device step, sbt-thicket thicketDeviceApple, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: docs, decision log, scalafmt exclude for the generated DeviceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: catch a leftover refusal (notYetAsked, failed DRIVE fails), settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: uninstall at the end of a fresh-install run instead of a settle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #114: macOS measured unlocked: gallery 195 (185 + 10), occlusion control 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Share: thicket-share and -android, files served by Thicket's own provider (#135) * Share: thicket-share and -android, files served by Thicket's own provider docs/16 §16.10 item 5, to the owner's decision of 2026-11-01: a framework ContentProvider the app declares in its manifest, not AndroidX's FileProvider. - thicket-share: Share.text, Share.file, availability; SharedFiles (copies served only from their own directory, with their type; pruned after a day); RecordingShare; Share.unavailable for GTK. - thicket-share-android: ACTION_SEND through the chooser. ThicketFileProvider, not exported, read-only, serves only <cache>/thicket-shared, under FLAG_GRANT_READ_URI_PERMISSION and the intent's ClipData. Undeclared, a file share throws naming the element. Measured: - checkLinux (with-keyring, 8 GB): exit 0; ShareSpec 5/5, JVM and Native. - GTK gallery 137 (136 + 1), todo 69, under a headless gnome-shell (desktop locked). - Android gallery 85/85 (81 + 4) on s2test: build.sh taps the gallery's own share target in the real chooser; text and file (name, type, bytes) arrive, and the provider logs com.android.intentresolver reading the file through the grant. Falsified: without the grant, the share sheet's read disappears and that check fails. Found: ART has no Files.writeString/readString; the first run threw NoSuchMethodError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Refactor sharing process with error handling Refactor sharing logic to use Try for error handling. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Apple location: thicket-location-apple over CLLocationManager (iOS); macOS Location.unavailable (#118) (#138) * WIP #114: thicket-device-apple, its Swift library and the thk_dev ABI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: the Apple galleries' device checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: iOS DRIVE hooks, XCUITest tapper; iOS gallery 191/191 on iPhone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: verify-apple shim-device step, sbt-thicket thicketDeviceApple, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: docs, decision log, scalafmt exclude for the generated DeviceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: catch a leftover refusal (notYetAsked, failed DRIVE fails), settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: uninstall at the end of a fresh-install run instead of a settle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #114: macOS measured unlocked: gallery 195 (185 + 10), occlusion control 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: thicket-location-apple over CLLocationManager in libthicketdevice; gallery location checks Untested on the simulator yet. thk_dev_location_* (5 functions) in DeviceAbi; DeviceConsistencySpec 7/7. libthicketdevice.a 91 KB macOS / 92 KB simulator (43 / 46 KB before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: iOS gallery waits up to 6 min Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: iOS location self-test passes on iPhone Air, 199 checks (191 + 8) The background check records what the section shows while away: iOS suspends the app, so a 3 s timer set in the background never fired (the first runs timed out there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #118: docs 14, 16, the location, device and gallery READMEs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #118: decision log and docs/12: iOS gallery 199 (191 + 8), macOS 192 locked (191 + 1) Control: without WhileInFront's background stop, 1 FAIL (1 counted, 2 in libthicketdevice) while the on-screen check passes. Found 10BC8 : on a just-booted simulator getNotificationSettings exceeds the 5 s cap on 3 of 7 boots (with or without CoreLocation), read as Denied (#114). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #118: decision log: verify-apple.sh "iPhone Air" 17/17 on 2e2d61a Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #118: decision log: it was the first full run that failed getting-started Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Apple device lifecycle and permissions: thicket-device-apple, the galleries' Device section (#114) (#132) * WIP #114: thicket-device-apple, its Swift library and the thk_dev ABI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: the Apple galleries' device checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: iOS DRIVE hooks, XCUITest tapper; iOS gallery 191/191 on iPhone 17e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: verify-apple shim-device step, sbt-thicket thicketDeviceApple, README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: docs, decision log, scalafmt exclude for the generated DeviceShim.scala Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: catch a leftover refusal (notYetAsked, failed DRIVE fails), settle 30 s before a fresh install Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP #114: uninstall at the end of a fresh-install run instead of a settle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #114: macOS measured unlocked: gallery 195 (185 + 10), occlusion control 4 FAIL hidden -> Background 49 ms, unhidden -> Foreground 33 ms, minimised 595 ms, restored 528 ms. bin/verify-apple.sh "iPhone 17e": 17/17 steps on 9cff276; iOS gallery 191 (179 + 12), macOS gallery 195 twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Share: thicket-share and -android, files served by Thicket's own provider (#135) * Share: thicket-share and -android, files served by Thicket's own provider docs/16 §16.10 item 5, to the owner's decision of 2026-11-01: a framework ContentProvider the app declares in its manifest, not AndroidX's FileProvider. - thicket-share: Share.text, Share.file, availability; SharedFiles (copies served only from their own directory, with their type; pruned after a day); RecordingShare; Share.unavailable for GTK. - thicket-share-android: ACTION_SEND through the chooser. ThicketFileProvider, not exported, read-only, serves only <cache>/thicket-shared, under FLAG_GRANT_READ_URI_PERMISSION and the intent's ClipData. Undeclared, a file share throws naming the element. Measured: - checkLinux (with-keyring, 8 GB): exit 0; ShareSpec 5/5, JVM and Native. - GTK gallery 137 (136 + 1), todo 69, under a headless gnome-shell (desktop locked). - Android gallery 85/85 (81 + 4) on s2test: build.sh taps the gallery's own share target in the real chooser; text and file (name, type, bytes) arrive, and the provider logs com.android.intentresolver reading the file through the grant. Falsified: without the grant, the share sheet's read disappears and that check fails. Found: ART has no Files.writeString/readString; the first run threw NoSuchMethodError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Refactor sharing process with error handling Refactor sharing logic to use Try for error handling. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
#128) (#140) Every failed apple.yml run since #132 failed ios-gallery on "notifications start Denied, not yet asked" (5 of 5 checked). verify-apple reboots the simulator before each iOS step, and right after a boot getNotificationSettings can take longer than the shim's 5 s cap, which read as denied. The shim now answers 4, "no answer within 5 s". ApplePermissions.status still reports it as Denied: the API is unchanged and the main thread waits no longer. AppleDevice.testing.notYetAsked asks again, up to about 60 s, and logs the codes it saw. Measured from a cold boot, "iPhone 18 Pro Max" with the Mac at load average 166: codes 4,4,4,4,4,3 in 28.7 s, and the check passed. A clean full verify-apple run waits for a quiet machine. Co-authored-by: Roberto Leibman <rleibman@magrathea.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ntry (#144) The entry appeared twice: once at the top of the 11-01 group, once between the 10-30 entries, byte-identical (md5 deec7cd7 for both). It came from my merge of #132's branch into #138 (bf07e36), which moved the entry back to the top while git also kept it where the other side had it. Only the copy out of place is removed; no entry's text changes. Checked: grep counts the entry's heading once (was twice). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Closes #114.
thicket-device-apple(inplatforms): the app's lifecycle and permissions on macOS and iOS. Both Apple galleries now passdevice = Some(AppleDevice()), and their self-tests check the Device section through the real notifications.What it is
modules/device-apple/shim,libthicketdevice.a, 43 KB macOS / 46 KB simulator), modelled onthicket-http-apple. I chose Swift over a C helper because the observers are block-basedNotificationCenterregistrations, the permission APIs take completion blocks, and Apple location: thicket-location-apple over CLLocationManager (iOS); macOS Location.unavailable #118 needs aCLLocationManagerDelegate, which is an Objective-C class. An app without the module links none of it, and none of UserNotifications or AVFoundation.DeviceAbiintools/shim-gen(thk_dev_*, 9 functions, its own callback typedefs), checked byDeviceConsistencySpec(7 tests). Unlike HTTP it calls back into Scala, but only on the main thread: answers that arrive on another queue are moved there first. Every callback is wrapped inGcState.guarded.willEnterForegroundto the last scene'sdidEnterBackground. It does not use activation. In a probe, the notifications alert did not even deactivate the scene, and a headless simulator never activated a scene at all. Terminate isUIApplication.willTerminateNotification.simctl terminatenever sends it.NSApp.occlusionState, through one notification that covers hide, minimise, order-out and being covered. It means "on screen", not "active", which matches GTK. While the screen is locked every window is occluded, so the app is in the background. Terminate isNSApplication.willTerminateNotification.AVCaptureDevice; notifications throughUNUserNotificationCenter(provisional counts asGranted).Restrictedis real on Apple. Not yet asked reads asDenied.NSCameraUsageDescription/NSMicrophoneUsageDescriptionthrowsIllegalStateExceptionnaming the key, because iOS would terminate the app instead.UNUserNotificationCenterraises there, and the macOS gallery is a plain executable.UnsupportedOperationExceptionuntil Apple location: thicket-location-apple over CLLocationManager (iOS); macOS Location.unavailable #118.thicketDeviceAppletask unpacks and links the library, andThicketNativeFlags.appleDevicehas a test inSharedFlagsSpec.Answering the alert: XCUITest
Nothing else can tap the simulator headlessly:
simctlhas no tap;simctl privacyhas no notifications service;XCUIApplication("Device is not configured for UI testing");examples/ios-host/tapperis a UI-testing bundle with no target app that taps SpringBoard's button (~8 s a tap).run-ios-app.shgains:drive, for[gallery] DRIVE home|front|denylines, as on Android;EXTRA_LIBS,USAGE_STRINGS,FRESH_INSTALLandPRIVACY_GRANT.A DRIVE action that fails now fails the run.
Measured
bin/verify-apple.sh "iPhone 17e": 17/17 steps on9cff276. There is one new step,shim-device, andabinow includesDeviceConsistencySpec.simctl privacy, → Granted;willTerminateNotification;NSApp.terminateand prints the verdict, so a hook that never runs leaves no verdict.Controls (each fix removed, then restored)
didEnterBackgroundobserver → the app is suspended unseen and the run ends with no verdict;willEnterForeground→ 2 FAIL;Success(Denied)).Found on the way
The first full verify passed even though the alert was never shown.
AppleDevice.testing.notYetAsked);For #118 / #120
Permission.Location(code 0) toDeviceShim.swift'sstatus,permission_missingandrequest(requestWhenInUseAuthorizationplus a delegate in the same file), and flip the gallery's "Location throws" check.AppleLifecycle.stateis whatWhileInFrontfollows.Not done
🤖 Generated with Claude Code