Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] - Let the system handle some External App Prompts #27214

Merged
merged 1 commit into from
Jan 14, 2025
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
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
Loading