Skip to content

Instantly share code, notes, and snippets.

@leoneparise
Last active February 23, 2017 00:30
Show Gist options
  • Save leoneparise/48b0447c76ac5a232b21aa19cd0bc3c1 to your computer and use it in GitHub Desktop.
Save leoneparise/48b0447c76ac5a232b21aa19cd0bc3c1 to your computer and use it in GitHub Desktop.
fileprivate func notificationFactory(userInfo: [AnyHashable : Any]) -> RemoteNotificationType? {
guard let type = userInfo["type"] as? String else { return nil }
if type == Notifications.openUserProfile.name.rawValue {
return Notifications.openUserProfile(userInfo: userInfo)
}
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment