Elena
Elena

Reputation: 829

Getting push notification details on app launch

Is there any way to get information from push notification when app is launched (from killed state) by tapping its icon, and PUSH IS NOT BEING TAPPED?

Upvotes: 1

Views: 452

Answers (2)

andresk
andresk

Reputation: 2845

I'm not 100% sure, but I think that you could handle the notification once it's received (you set the content-available flag so your code can be run), store a flag on UserDefaults along with the push information, and once the app is opened you could use these informations.

For more information on "silent" push notifications check here

Upvotes: 2

Damien
Damien

Reputation: 3362

You can't get informations from a notification in notification center without the user tapping it.

However, if you are trying to implement invisible notifications, that's possible, but the app won't launch foreground.

Upvotes: 0

Related Questions