How do I use SFSafariViewController with SwiftUI?
问题 I'm trying to present a SFSafariViewController from a NavigationButton but I'm not sure how to do that with SwiftUI. In UIKit, I would just do: let vc = SFSafariViewController(url: URL(string: "https://google.com"), entersReaderIfAvailable: true) vc.delegate = self present(vc, animated: true) 回答1: Supplemental to Matteo Pacini post, .presentation(Modal()) was removed by iOS 13's release. This code should work (tested in Xcode 11.3, iOS 13.0 - 13.3): import SwiftUI import SafariServices struct