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.4.0
WebViewKit is a Swift SDK that adds a WebView & SafariWebView to SwiftUI.
⭐️ 81
🕓 5 weeks ago
iOS macOS
.package(url: "https://github.com/danielsaidi/WebViewKit.git", from: "0.4.0")

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.

GitHub

link
Stars: 81
Last commit: 5 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

5 weeks ago

This version adds support for visionOS.

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