Reputation: 237
Is it possible to receive notification data when app is terminated without notification being pressed?
I'm using
func application( _ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {}
It works fine if the app is in foreground or background, but it has no effect if the app is terminated, so my question is it possible to handle notification data in a delegate if app is terminated and how?
Thanks.
Upvotes: 1
Views: 675
Reputation: 1444
There are only following way to get Notification Data :
didReceiveRemoteNotification
)didFinishLaunchingWithOptions
)App will not be able to handled it if you don't tap on the notification. You can only process the old notification data by having a web service to give you the unread or unprocessed notifications.
Upvotes: 3