When App receives local notifications, didReceiveRemoteNotification has some operations. It works fine when app is in foreground. Also when app receives notification in background and open app by clicking on the notification. But NOT working when we open the app, without clicking the notification.
How to solve this ?
if let options = launchOptions, notification = options[UIApplicationLaunchOptionsRemoteNotificationKey] as? [NSObject : AnyObject] {
self.application(application, didReceiveRemoteNotification: notification, fetchCompletionHandler: { (NewData) in
})
}