Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/BlazorWebView/src/Maui/iOS/IOSWebViewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public WebViewUIDelegate(BlazorWebViewHandler webView)
_webView = webView ?? throw new ArgumentNullException(nameof(webView));
}


public override void RunJavaScriptAlertPanel(WKWebView webView, string message, WKFrameInfo frame, Action completionHandler)
{
PresentAlertController(
Expand Down Expand Up @@ -246,9 +245,13 @@ public override void DecidePolicy(WKWebView webView, WKNavigationAction navigati
{
_webView.Logger.LaunchExternalBrowser(uri);

#pragma warning disable CA1416, CA1422 // TODO: OpenUrl(...) has [UnsupportedOSPlatform("ios10.0")]
UIApplication.SharedApplication.OpenUrl(requestUrl);
#pragma warning restore CA1416, CA1422
UIApplication.SharedApplication.OpenUrl(requestUrl, new UIApplicationOpenUrlOptions(), (success) =>
{
if (!success)
{
_webView.Logger.LogError($"There was an error trying to open URL: {requestUrl}");
}
});
}

if (strategy != UrlLoadingStrategy.OpenInWebView)
Expand Down
Loading