WebViewKit

0.4.1

WebViewKit adds a WebView and SafariWebView to SwiftUI.
danielsaidi/WebViewKit

What's New

2024-06-08T17:25:55Z

This version adds support for strict concurrency.

WebViewKit Logo

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

About WebViewKit

WebViewKit is a Swift SDK that adds a WebView and a SafariWebView to SwiftUI.

The web view can be used to display web sites in your apps, for instance like this:

The WebView can load any url and be configured to fit your needs. There's also a SafariWebView for more basic needs.

Installation

WebViewKit can be installed with the Swift Package Manager:

https://github.com/danielsaidi/WebViewKit.git

Getting started

The library's main view is WebView, which can be used to display any URL:

import SwiftUI
import WebViewKit

struct MyView {

    var body: some View {
        WebView(urlString: "https://danielsaidi.com")
    }
}

The URL can point to any regular web site, but also to local web pages in your app bundle. There's also an iOS only SafariWebView, which has less configuration support and standard toolbars surrounding the web browser.

For more information, please see the getting started guide.

Documentation

The online documentation has more information, articles, code examples, etc.

Demo Application

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

Support my work

You can sponsor me on GitHub Sponsors or reach out for paid support, to help support my open-source projects.

Your support makes it possible for me to put more work into these projects and make them the best they can be.

Contact

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

License

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

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Dec 09 2024 04:23:12 GMT-1000 (Hawaii-Aleutian Standard Time)