One Logo Pool Ball
WebKit · IOS API REFERENCE

WebPage.NavigationDeciding

protocol · iOS 26.0+ · SDK 27.1

protocol NavigationDeciding

Allows providing custom behavior to handle navigation changes and to coordinate these changes for the web page's main page. For example, you might use these methods to restrict navigation from specific links within your content.

Members (4)

method · iOS 27.0+

willSubmit

Swift declaration
@MainActor func willSubmit(formInfo: WebPage.FormInfo) async

By default, this method does nothing.

method · iOS 26.0+

decidePolicy

Swift declaration
@MainActor func decidePolicy(for action: WebPage.NavigationAction, preferences: inout WebPage.NavigationPreferences) async -> WKNavigationActionPolicy

By default, this method immediately returns with a policy of `.allow`.

Omit the output parameters from the call. The result contains $ret and $out, with preferences inside $out.

method · iOS 26.0+

decidePolicy

Swift declaration
@MainActor func decidePolicy(for response: WebPage.NavigationResponse) async -> WKNavigationResponsePolicy

By default, this method immediately returns with a policy of `.allow`.

method · iOS 26.0+

decideAuthenticationChallengeDisposition

Swift declaration
@MainActor func decideAuthenticationChallengeDisposition(for challenge: URLAuthenticationChallenge) async -> (URLSession.AuthChallengeDisposition, URLCredential?)

By default, this method immediately returns with a disposition of `performDefaultHandling` and a `nil` credential.

Skipped declarations

No declarations were skipped in this snapshot.

All WebKit types →