One Logo Pool Ball
WebKit · IOS API REFERENCE

URLScheme

struct · iOS 26.0+ · SDK 27.1

struct URLScheme

A type representing a valid URL scheme. Scheme names are case sensitive, must start with an ASCII letter, and may contain only ASCII letters, numbers, the “+” character, the “-” character, and the “.” character.

Members (2)

get · iOS 26.0+

rawValue

TypeScript
getRawValue($self: URLScheme): string
Swift declaration
let rawValue: String

The raw value of the scheme string.

init · iOS 26.0+

init

TypeScript
init(rawValue: string): Promise<(URLScheme) | null>
Swift declaration
@MainActor init?(_ rawValue: String)

Creates a new `URLScheme` value from a valid scheme, which WebKit does not already handle. To determine whether WebKit handles a specific scheme, call the `handlesURLScheme(_:)` static method of `WebPage`. - Parameter rawValue: The raw value of the scheme string; if this is an invalid scheme, of if WebKit already handles this scheme, the initializer returns `nil`.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

URLScheme

The iOS SDK compiler rejected this binding: initializer 'init(_:)' has different argument labels from those required by protocol 'RawRepresentable' ('init(rawValue:)')

All WebKit types →