Created
February 28, 2019 19:59
-
-
Save rldaulton/c544b7fcb49a4c789812b4089f061f06 to your computer and use it in GitHub Desktop.
You should always check if a link is univeral, before opening it in any browser session of SFSafariView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url = URL(string: "https://youtu.be/5IVsLLlRNXc")! | |
UIApplication.shared.open(url, options: [.universalLinksOnly: true]) { (success) in | |
if !success { | |
// not a universal link or app not installed | |
let vc = SFSafariViewController(url: url) | |
self.present(vc, animated: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah the file looks okay with that tool. Just thought I'd check - thanks anyway!