Skip to content

Commit

Permalink
[iOS] - Let the system handle some External App Prompts (#27214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T authored Jan 14, 2025
1 parent 819e3c6 commit 04b7fc9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ extension BrowserViewController: WKNavigationDelegate {

// First special case are some schemes that are about Calling. We prompt the user to confirm this action. This
// gives us the exact same behaviour as Safari.
// tel:, facetime:, facetime-audio:, already has its own native alert displayed by the OS!f
// tel:, facetime:, facetime-audio:, already has its own native alert displayed by the OS!
if ["sms", "mailto"].contains(requestURL.scheme) {
let shouldOpen = await handleExternalURL(
requestURL,
Expand All @@ -225,6 +225,12 @@ extension BrowserViewController: WKNavigationDelegate {
return (shouldOpen ? .allow : .cancel, preferences)
}

// Let the system's prompt handle these. We can't let these cases fall-through, as the last check in this file will
// assume it's an external app prompt
if ["tel", "facetime", "facetime-audio"].contains(requestURL.scheme) {
return (.allow, preferences)
}

// Second special case are a set of URLs that look like regular http links, but should be handed over to iOS
// instead of being loaded in the webview.
// In addition we are exchaging actual scheme with "maps" scheme
Expand Down

0 comments on commit 04b7fc9

Please sign in to comment.