Instantly share code, notes, and snippets.

Embed
What would you like to do?
Swift Post Testability Example Code
protocol URLOpening {
func canOpenURL(_ url: URL) -> Bool
func open(_ url: URL,
options: [UIApplication.OpenExternalURLOptionsKey : Any],
completionHandler completion: ((Bool) -> Void)?)
}
extension UIApplication: URLOpening {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment