Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open links by Universal Links when possible (Cf. #76) #100

Open
PlugNPush opened this issue May 8, 2021 · 0 comments
Open

Open links by Universal Links when possible (Cf. #76) #100

PlugNPush opened this issue May 8, 2021 · 0 comments

Comments

@PlugNPush
Copy link
Collaborator

PlugNPush commented May 8, 2021

A different way to handle the issue #76. Because it is preferable to stick with SFSafariWebView instead of opening Safari. Cc @nathanfallet.

UIApplication.shared.open(url, options: [.universalLinksOnly: true]) { (success) in
    if !success {
        // not a universal link or app not installed, opening in Safari Web View instead
        let safariViewController = SFSafariViewController(url: url, configuration: config) 
        safariViewController.present(vc, animated: true)
    }
}

Source: https://recoursive.com/2019/02/22/preflight_universal_links/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant