---
title: "registerURLScheme(asLocal:)"
framework: webkit
role: symbol
role_heading: Type Method
path: "webkit/webview-swift.class/registerurlscheme(aslocal:)"
---

# registerURLScheme(asLocal:)

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

## Declaration

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

## Parameters

- `scheme`: The scheme to add to the list.

## Discussion

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.

## See Also

### Registering Document Views and Representations

- [registerClass(_:representationClass:forMIMEType:)](webkit/webview-swift.class/registerclass(_:representationclass:formimetype:).md)
