pocket-ios icon indicating copy to clipboard operation
pocket-ios copied to clipboard

Skip `SFSafariViewController` to open links with Catalyst

Open vtourraine opened this issue 10 months ago • 0 comments

Hello there,

I love using the app on my Mac, but one thing that I find bothersome is how links open in the browser. I know Catalyst supports SFSafariViewController, but it first shows an extra dialog that doesn’t serve any purpose.

Image

I believe it would be more convient to open the URL on UIApplication directly, like this:

#if targetEnvironment(macCatalyst)
        UIApplication.shared.open(url)
#else
        let viewController = SFSafariViewController(url: url)
        present(viewController, animated: true, completion: nil)
#endif

I’m happy to open a pull request if you agree with this change.

Thanks!

vtourraine avatar Jan 30 '25 20:01 vtourraine