From 27bf07ba650897ffb53d8688b1507960e0fe5fc1 Mon Sep 17 00:00:00 2001 From: t-jimbo Date: Thu, 13 Aug 2026 14:24:51 +0900 Subject: [PATCH] docs: trim WEBVIEW_MODAL canOpenURL comment Keep the intent without redundant or directive wording. Co-authored-by: Cursor --- .../Component/renderer/modal-component.swift | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Sources/Nubrick/Component/renderer/modal-component.swift b/Sources/Nubrick/Component/renderer/modal-component.swift index 46d32f54..b124bcf0 100644 --- a/Sources/Nubrick/Component/renderer/modal-component.swift +++ b/Sources/Nubrick/Component/renderer/modal-component.swift @@ -44,15 +44,10 @@ class ModalComponentViewController: UIViewController { case .ignore: return case .openExternally(let urlObj): - // Best-effort fallback so non-http(s) never reach SFSafariViewController. - // Matches `openLink` in sdk.swift: canOpenURL then open. - // - // Note: canOpenURL returns false for third-party schemes not listed in the - // host app's LSApplicationQueriesSchemes. As an SDK we cannot set that - // Info.plist key, so custom schemes (e.g. myapp://) may no-op here. - // That is acceptable for WEBVIEW_MODAL — the supported case is http(s). - // Do not switch to open-without-canOpenURL just to paper over QueriesSchemes; - // broader deep-link open policy would be a separate change. + // Non-http(s) URLs are opened externally as a best-effort fallback. + // Custom schemes may return false unless the host app declares them in + // LSApplicationQueriesSchemes. This is acceptable because WEBVIEW_MODAL + // officially supports web URLs only. guard UIApplication.shared.canOpenURL(urlObj) else { return }