ReviewOS

also looking at this

craft-native/craft

iOS Phase 8: the presented pickers — ratchet 58 → 53, last mechanism landed

#90
Merged glennmichael123 wants to merge feat/ios-phase8-ui into main
11 files +5752 -12
packages/ios/fixtures/zig-slice/page.mmodified+8-2
Changes to packages/ios/fixtures/zig-slice/page.m
@@ -45,11 +45,15 @@ const char craft_slice_page[] =
4545 " bridge.postMessage({t:'mobile', a:'getDeviceInfo', i:3});\n"
4646 "}\n"
4747 "\n"
48 "var sentErrorAck = false;\n"
48 "var sentErrorAck = false, sentCode = false;\n"
4949 "window.__craftBridgeError = function (ctx) {\n"
5050 " // The message crossed Zig's escaping with a backslash, quote, and\n"
5151 " // newline intact; anything mangled and this equality fails, i=7 never\n"
5252 " // fires, and the harness reports the error route broken.\n"
53 " if (!sentCode && ctx && ctx.code === 'PERMISSION_DENIED' && ctx.id === 70) {\n"
54 " sentCode = true;\n"
55 " bridge.postMessage({t:'mobile', a:'getDeviceInfo', i:18});\n"
56 " }\n"
5357 " var messageIntact = ctx && ctx.message === 'declined \\\\ \"on purpose\"\\nsecond line';\n"
5458 " if (!sentErrorAck && ctx && ctx.error === true && ctx.code === 'HOST_DECLINED'\n"
5559 " && ctx.id === 6 && messageIntact) {\n"
@@ -123,7 +127,9 @@ const char craft_slice_page[] =
123127 " bridge.postMessage({t:'mobile', a:'getPendingNotifications', i:50});\n" " // Motion is unavailable on a simulator, so this must REJECT — an\n"
124128 " // honest refusal, not a fabricated stream of zeros. i=16 stays unsent,\n"
125129 " // which is the assertion.\n"
126 " bridge.postMessage({t:'mobile', a:'startMotionUpdates', i:60});\n"
130 " bridge.postMessage({t:'mobile', a:'startMotionUpdates', i:60});\n" " // No camera on a simulator. The refusal must name its own cause —\n"
131 " // a specific code, not the generic native-failure catch-all.\n"
132 " bridge.postMessage({t:'mobile', a:'openCamera', i:70});\n"
127133 " // A Tier-0 action migrated in this phase, served by Zig directly.\n"
128134 " bridge.postMessage({t:'mobile', a:'getAppState', i:88});\n"
129135 " // And one the shim answers by rejecting, to prove the error route.\n"