Skip to content

Add support for mailto, sms, and tel schemes.#305

Open
Phoenix7351 wants to merge 4 commits into
mainfrom
tiffner/CA-6268
Open

Add support for mailto, sms, and tel schemes.#305
Phoenix7351 wants to merge 4 commits into
mainfrom
tiffner/CA-6268

Conversation

@Phoenix7351

@Phoenix7351 Phoenix7351 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes an issue where common non-http(s) schemes (mailto, tel, sms) did nothing when tapped.

Note

Low Risk
Localized navigation-handoff change with tests; behavior is limited to opening external URLs outside the web view.

Overview
External URL schemes (mailto:, tel:, sms:, and any non–web-navigable scheme) are now opened via the OS instead of being dropped or only handled on the main navigation path.

URL gains shouldDelegateToSystem (anything with a scheme that is not http/https/about/data/blob) and the in-webview scheme check is renamed to isWebNavigableScheme. Unsupported navigations still cancel in the web view, but opening is centralized in delegateURLToSystem, which uses UIApplication.shared.open on iOS and NSWorkspace.shared.open on macOS, with a shared denial callback for logging.

New-window navigations (WKUIDelegate) now use the same delegation when the target URL is a system scheme, so links like mailto: opened in a new window are handled like normal link taps. Tests cover scheme classification and that NavigationRequest is nil for mailto: actions.

Reviewed by Cursor Bugbot for commit 6afb6d9. Configure here.

@Phoenix7351 Phoenix7351 added the minor Changes that should bump the MINOR version number label Jul 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6afb6d9. Configure here.

Comment thread lib/Sources/Navigation/NavigationEngine+WKUIDelegate.swift Outdated
@Phoenix7351
Phoenix7351 marked this pull request as ready for review July 16, 2026 21:09
@Phoenix7351 Phoenix7351 changed the title Add support for mailto, sms, and tel schemes. Add support for mailto, sms, and tel schemes. Jul 17, 2026

@davertay-j davertay-j left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new logic is just shuffling around conditionals that already exist at the callsite. The logic change should be isolated solely to the createWebViewWith callback.

Comment thread lib/Sources/Navigation/NavigationEngine+WKUIDelegate.swift Outdated
Comment thread lib/Sources/Navigation/NavigationRequest.swift
Comment thread lib/Tests/NavigationTests/NavigationRequestTests.swift Outdated
@Phoenix7351
Phoenix7351 requested a review from davertay-j July 20, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Changes that should bump the MINOR version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants