我正在尝试使用本地html打开SFSafariViewController
,但这会导致崩溃。
let vc = SFSafariViewController(url: URL(fileURLWithPath: Bundle.main.path(forResource: "untitled", ofType: "html")!))
vc.delegate = self
self.present(vc, animated: true)
有办法吗?调试时可以看到文件路径。
../ Devices / 4980A022-975B-47D3-991B-C9741B06A5FB / data / Containers / Bundle / Application / 22BFED43-49B2-4EB9-BAC3-BED26440BA52 / xxxx-Internal.app / untitled.html >