ReviewOS

also looking at this

craft-native/craft

fix(ios): resolve openSettings' selector before the lease, and say why two actions have no deadline

#251
Merged glennmichael123 wants to merge fix/ios-open-settings-lease into main
2 files +25 -2
packages/zig/src/bridge_mobile_system.zigmodified+9-0
Changes to packages/zig/src/bridge_mobile_system.zig
@@ -376,6 +376,15 @@ pub const uikit = if (is_darwin) struct {
376376 /// app has not listed in `LSApplicationQueriesSchemes`, so gating on it
377377 /// would refuse URLs that `open:` would in fact have opened. The completion
378378 /// handler's BOOL is the only truthful answer available.
379 ///
380 /// No deadline, deliberately, although #223 lists this action for one.
381 /// Its reason for wanting one does not apply here: this call leases no
382 /// `ios_async` reply slot, so there is no slot for a deadline to free and
383 /// no next call to hand the block to. The request id travels in the block
384 /// itself, and `openURL:options:completionHandler:` heap-copies it. What a
385 /// deadline *would* do is time out a person: `tel:` and `facetime:` put a
386 /// "Call …?" confirmation on screen, and the completion waits for their
387 /// answer.
379388 fn openURL(allocator: std.mem.Allocator, url_string: []const u8, request_id: i64) !void {
380389 const UIApplication = objc.objc_getClass("UIApplication") orelse return error.ClassNotFound;
381390 const sel_shared = objc.sel_registerName("sharedApplication") orelse return error.SelectorNotFound;