Reputation: 83
I already can manage push notifications from FCM when the app is in Foreground or background, when I do click in notification popup and open app "application didReceiveRemoteNotification" work without problem
My problem is that i don't know how get notification push data if the user open the app normaly (do click in icon app instead of click in notification) and I would lost the data if he close the notification
Upvotes: 1
Views: 1279
Reputation: 2286
If the app is in background state UINotification called application didReceiveRemoteNotification , If app is in open state UINotification called application:didFinishLaunchingWithOptions, And can't possible to get data without click on notification in iOS.
Upvotes: 2
Reputation: 74
check
UIApplicationLaunchOptionsRemoteNotificationKey or application:didFinishLaunchingWithOptions
Upvotes: 1