Create an SFSafariViewController safely — don’t crash on an unhandled Objective-C exception.

This commit is contained in:
Brent Simmons committed 2025-12-04 09:32:46 -08:00
1 parent a63609b7a0
commit 599636b310
5 files changed
+54 -3

No files matched your search

+3 -2
View File
@@ -810,8 +810,9 @@ private extension WebViewController {
}
func openURLInSafariViewController(_ url: URL) {
let viewController = SFSafariViewController(url: url)
guard let viewController = SFSafariViewController.safeSafariViewController(url) else {
return
}
present(viewController, animated: true)
}
}