Created
December 9, 2018 20:47
-
-
Save joseph-elmallah/a0450b1f9f4779608fb9e3a0816709e7 to your computer and use it in GitHub Desktop.
The conformance of UIApplication to the URLHandler protocol
This file contains hidden or 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
// MARK: - URLHandler conformance | |
extension UIApplication: URLHandler { | |
func handleURL(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any], completionHandler completion: ((Bool) -> Void)?) { | |
// If we reach the end of the responder chain without anyone handeling the URL, ask the Applciation to handle it | |
open(url, options: options, completionHandler: completion) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment