---
title: "init(resourceBaseURL:)"
framework: webkit
role: symbol
role_heading: Initializer
path: "webkit/wkwebextension/init(resourcebaseurl:)"
---

# init(resourceBaseURL:)

Creates a web extension initialized with a specified resource base URL, which can point to either a directory or a ZIP archive.

## Declaration

```swift
@MainActor @preconcurrency convenience init(resourceBaseURL: URL) async throws
```

## Parameters

- `resourceBaseURL`: The file URL to use for the new web extension.

## Discussion

Discussion The URL must be a file URL that points to either a directory with a manifest.json file or a ZIP archive containing a manifest.json file. If the manifest is invalid or missing, or the URL points to an unsupported format or invalid archive, an error will be returned. note: An error if the manifest is invalid or missing, or the URL points to an unsupported format or invalid archive.
