Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
For handling Universal Links
func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
guard let rootViewCntrlr = self.window?.rootViewController else {
return false;
}
guard let viewCntrlr = rootViewCntrlr as? ViewController else {
return false;
}
viewCntrlr.URLLabel.text = userActivity.webpageURL?.absoluteString;
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment