Handle Remote Notification Receive in ios

时间:2017-06-15 10:27:42

标签: ios iphone swift push-notification apple-push-notifications

I implemented remote notification in my app & it works fine! But I am stuck for handle navigation from notification.

When app is in forground--- Working fine

willPresent notification method will be called & I handled navigation while user taps on banner

When app is in background or closed completely

didReceive response will be called

Problem: When I check status for both (background & completely closed), it shows me as background only, I am not able to differentiate both these states any how.

Thank you for your time.

1 个答案:

答案 0 :(得分:0)

As far as I know, this process is completely managed by iOS that one cannot guarantee you differentiating the statuses. I recommend you handling the events regarding closing or sending the application background and write the latest state to a file. Then, you can read it anytime to understand the latest state of the application.