Last active
September 25, 2020 22:51
-
-
Save regularberry/c414ff2143118f763552bc34f43770f5 to your computer and use it in GitHub Desktop.
Opening ClassKit activity
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
func application(_ application: UIApplication, | |
continue userActivity: NSUserActivity, | |
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { | |
guard | |
userActivity.isClassKitDeepLink, | |
let identifierPath = userActivity.contextIdentifierPath, | |
let gameID = identifierPath.last | |
else { return false } | |
let gameVC = GameViewController(gameID: gameID) | |
navigationController.pushViewController(gameVC, animated: true) | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment