diff --git a/apps/ios/Sources/Model/NodeAppModel.swift b/apps/ios/Sources/Model/NodeAppModel.swift index 718f25e0c..ef73d8b0a 100644 --- a/apps/ios/Sources/Model/NodeAppModel.swift +++ b/apps/ios/Sources/Model/NodeAppModel.swift @@ -35,7 +35,7 @@ final class NodeAppModel { let enabled = UserDefaults.standard.bool(forKey: "voiceWake.enabled") self.voiceWake.setEnabled(enabled) - + // Wire up deep links from canvas taps self.screen.onDeepLink = { [weak self] url in guard let self else { return } diff --git a/apps/ios/Sources/Screen/ScreenController.swift b/apps/ios/Sources/Screen/ScreenController.swift index 3c46737db..5cd6bb1d6 100644 --- a/apps/ios/Sources/Screen/ScreenController.swift +++ b/apps/ios/Sources/Screen/ScreenController.swift @@ -12,7 +12,7 @@ final class ScreenController { var mode: ClawdisScreenMode = .canvas var urlString: String = "" var errorText: String? - + /// Callback invoked when a clawdis:// deep link is tapped in the canvas var onDeepLink: ((URL) -> Void)? @@ -252,17 +252,17 @@ final class ScreenController { /// Handles navigation policy to intercept clawdis:// deep links from canvas private final class ScreenNavigationDelegate: NSObject, WKNavigationDelegate { weak var controller: ScreenController? - + func webView( _ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, - decisionHandler: @escaping (WKNavigationActionPolicy) -> Void - ) { + decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) + { guard let url = navigationAction.request.url else { decisionHandler(.allow) return } - + // Intercept clawdis:// deep links if url.scheme == "clawdis" { decisionHandler(.cancel) @@ -271,7 +271,7 @@ private final class ScreenNavigationDelegate: NSObject, WKNavigationDelegate { } return } - + decisionHandler(.allow) } }