---
title: "init(scheme:host:path:)"
framework: webkit
role: symbol
role_heading: Initializer
path: "webkit/wkwebextension/matchpattern/init(scheme:host:path:)"
---

# init(scheme:host:path:)

Returns a pattern object for the specified scheme, host, and path strings.

## Declaration

```swift
init(scheme: String, host: String, path: String) throws
```

## Parameters

- `scheme`: On output, a pointer to an error object that describes why the method failed, or nil if no error occurred. If you are not interested in the error information, pass nil for this parameter.

## Return Value

Return Value A pattern object, or nil if any of the strings are invalid and an error will be set.
