One Logo Pool Ball
WebKit · IOS API REFERENCE

URLSchemeHandler

protocol · iOS 26.0+ · SDK 27.1

protocol URLSchemeHandler

A protocol for loading resources with URL schemes that WebKit doesn't handle. Adopt the `URLSchemeHandler` protocol in types that handle custom URL schemes for your web content. Custom schemes let you integrate custom resource types into your web content, and you may define custom schemes for resources that your app requires. For example, you might use a custom scheme to integrate content that is available only on the user's device, such as the user's photos. These types can then be registered to a particular WebPage by using the ``WebPage/Configuration-swift.struct/urlSchemeHandlers`` property of ``WebPage/Configuration-swift.struct``. When a web page encounters a resource that uses a custom scheme, it passes the `URLRequest` to the scheme handler, and expects a stream of responses and data to load the result. If WebKit determines that it no longer needs a resource that your handler is loading, it will cancel the Task responsible for the async sequence. Typically, this may happen when the user navigates to another page, but may happen for other reasons.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

No declarations were skipped in this snapshot.

All WebKit types →