Skip to content

Instantly share code, notes, and snippets.

@regularberry
Last active September 25, 2020 22:51
Show Gist options
  • Save regularberry/c414ff2143118f763552bc34f43770f5 to your computer and use it in GitHub Desktop.
Save regularberry/c414ff2143118f763552bc34f43770f5 to your computer and use it in GitHub Desktop.
Opening ClassKit activity
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