Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created September 29, 2018 19:38
Show Gist options
  • Save vialyx/491564ddb89bdbd5afee34d33e37e34c to your computer and use it in GitHub Desktop.
Save vialyx/491564ddb89bdbd5afee34d33e37e34c to your computer and use it in GitHub Desktop.
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if let shortcut = Shortcuts(rawValue: userActivity.activityType) {
NotificationCenter.default.post(name: shortcut.notification, object: userActivity)
}
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment