SFSafariViewController for SwiftUI

SafariServicesUI

SFSafariViewController for SwiftUI

Installation

.package(url: "https://github.com/cockscomb/SafariServicesUI.git", from: "0.1.0")

Usage

Link

import SwiftUI
import SafariServicesUI

struct ContentView: View {
    var body: some View {
        Link("Open in SFSafariViewController", destination: URL(string: "https://developer.apple.com")!)
            .openURLInSafariView()
    }
}

Attributed String

import SwiftUI
import SafariServicesUI

struct ContentView: View {
    var body: some View {
        Text("Open in SFSafariViewController with [Attributed String](https://developer.apple.com)")
            .openURLInSafariView()
    }
}

GitHub

View Github