<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebView-swift.class/registerURLScheme(asLocal:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebView(cm)registerURLSchemeAsLocal:"
  },
  "title" : "registerURLScheme(asLocal:)"
}
-->

# registerURLScheme(asLocal:)

Adds the specified URL scheme to the list of local schemes.

```
class func registerURLScheme(asLocal scheme: String!)
```

## Parameters

`scheme`

The scheme to add to the list.

## Discussion

You need to register a scheme as local to access resources with file URLs and to have the same security checks as a local file.

---

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)