Skip to content

Instantly share code, notes, and snippets.

@WildStudio
Created May 28, 2018 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WildStudio/cf4b62ad42365ee4aa918298615e34d5 to your computer and use it in GitHub Desktop.
Save WildStudio/cf4b62ad42365ee4aa918298615e34d5 to your computer and use it in GitHub Desktop.
struct LaunchOptionsHandler {
static func handle(launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> NSUserActivity? {
if let activityType = launchOptions?[.userActivityType] as? String {
if activityType == NSUserActivityTypeBrowsingWeb {
return NSUserActivity(activityType: NSUserActivityTypeBrowsingWeb)
}
}
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment