I am displaying local and remote notifications in my app. Now there is scenario if the notification is local then I want to take a different action or if the the notification is remote then I want to take some different action.
Till iOS 9 I was using below code to detect if the notification is local or remote.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    if launchOptions?[UIApplicationLaunchOptionsKey.localNotification] != nil {
        // Do what you want to happen when a remote notification is tapped.
    }
    return true
  }
But in iOS 10 this approach is deprecated so now how do I make sure the notification is local or remote ?