also looking at this
feat(ios): the Zig runtime, offered to a Swift-hosted app
#103
7 files
+868
-59
| @@ -670,9 +670,12 @@ pub const uikit = if (is_darwin) struct { | ||
| 670 | 670 | /// "which is already presenting" and silently does nothing, so the |
| 671 | 671 | /// completion handler never fires and the caller waits out its timeout. |
| 672 | 672 | pub fn topmostViewController() !objc.id { |
| 673 | // One `orelse`, not an `orelse` plus a null check. `getWebView` used to | |
| 674 | // answer a double optional, so the `orelse` unwrapped the outer level | |
| 675 | // and the second line was the guard that actually ran; now the slot is | |
| 676 | // a single `objc.id` and this catches both spellings of "no webview". | |
| 673 | 677 | const webview = ios_dispatch.getWebView() orelse |
| 674 | 678 | return bridge_error.BridgeError.WebViewHandleNotSet; |
| 675 | if (webview == null) return bridge_error.BridgeError.WebViewHandleNotSet; | |
| 676 | 679 | |
| 677 | 680 | const sel_window = objc.sel_registerName("window") orelse return error.SelectorNotFound; |
| 678 | 681 | const window = objc.msgSendId(webview, sel_window); |
| @@ -703,9 +706,12 @@ pub const uikit = if (is_darwin) struct { | ||
| 703 | 706 | /// pre-iOS-14 `+requestReview`, which is deprecated and may be gone, and it |
| 704 | 707 | /// is certainly not a reason to reply success having done nothing. |
| 705 | 708 | fn keyWindowScene() !objc.id { |
| 709 | // One `orelse`, not an `orelse` plus a null check. `getWebView` used to | |
| 710 | // answer a double optional, so the `orelse` unwrapped the outer level | |
| 711 | // and the second line was the guard that actually ran; now the slot is | |
| 712 | // a single `objc.id` and this catches both spellings of "no webview". | |
| 706 | 713 | const webview = ios_dispatch.getWebView() orelse |
| 707 | 714 | return bridge_error.BridgeError.WebViewHandleNotSet; |
| 708 | if (webview == null) return bridge_error.BridgeError.WebViewHandleNotSet; | |
| 709 | 715 | |
| 710 | 716 | const sel_window = objc.sel_registerName("window") orelse return error.SelectorNotFound; |
| 711 | 717 | const window = objc.msgSendId(webview, sel_window); |