<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/URLScheme",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "s:6WebKit9URLSchemeV"
  },
  "title" : "URLScheme"
}
-->

# URLScheme

A type representing a valid URL scheme.

```
struct URLScheme
```

## Overview

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.

## Topics

### Initializers

[`init?(String)`](/documentation/WebKit/URLScheme/init(_:))

Creates a new `URLScheme` value from a valid scheme, which WebKit does not already handle.

### Instance Properties

[`let rawValue: String`](/documentation/WebKit/URLScheme/rawValue)

The raw value of the scheme string.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)