Swiftpack.co - danielsaidi/WebViewKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by danielsaidi.
danielsaidi/WebViewKit 0.2.2
WebViewKit adds a WebView to SwiftUI.
⭐️ 49
🕓 6 days ago
iOS macOS
.package(url: "https://github.com/danielsaidi/WebViewKit.git", from: "0.2.2")

WebViewKit Logo

Version Swift 5.6 Swift UI MIT License Twitter: @danielsaidi Mastodon: @danielsaidi@mastodon.social

About WebViewKit

WebViewKit adds a SwiftUI WebView that can be used to embed local and online web sites in your SwiftUI apps.

The result can look like this and can also be presented in sheets, full screen covers etc.:

The WebView view can load any url and be fully configured to fit your needs. For more basic needs, you have a SafariWebView as well.


WebViewKit can be installed with the Swift Package Manager:


If you prefer to not have external dependencies, you can also just copy the source code into your app.

Supported Platforms

WebViewKit supports iOS 13 and macOS 11.

Getting started

The online documentation has a getting started guide guide to help you get started with WebViewKit.

The library's main view is WebView, which can be used to load local and online web pages:

import SwiftUI
import WebViewKit

struct MyView {

    let url = URL(string: "https://danielsaidi.com")

    var body: some View {
        WebView(url: url)

You can also provide it with a configuration block that can be used to configure the created WKWebView.

For more information, please see the online documentation and getting started guide.


The online documentation contains more information, code examples, etc., and makes it easy to overview the various parts of the library.

Demo Application

The demo app lets you explore the library on iOS and macOS. To try it out, just open and run the Demo project.


You can sponsor this project on GitHub Sponsors or get in touch for paid support.


Feel free to reach out if you have questions or if you want to contribute in any way:


WebViewKit is available under the MIT license. See the LICENSE file for more info.


Stars: 49
Last commit: 6 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

6 days ago

✨ New features

  • WebView now supports providing a WKWebViewConfiguration.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics