开发者

Push Notifications not opening app "With Options" if its not clicked immediately when its presented

开发者 https://www.devze.com 2023-03-22 01:47 出处:网络
I am running into a problem here. I am able to receive, capture and save an APNS message just fine if I do it while my app is 开发者_如何学Crunning or if I click \"View\" when it comes in if the app i

I am running into a problem here. I am able to receive, capture and save an APNS message just fine if I do it while my app is 开发者_如何学Crunning or if I click "View" when it comes in if the app is closed.

The problem I am running into is.. If the app is NOT running and I receive a APNS message and chose to look at it later by selecting "Close"... the next time I open the app, the app is not opening "with options". Therefor, the APNS message is lost. The same thing happens if the screen lock comes on before "viewing" the APNS message.

How do I handle this?

Thanks in advance!


Don’t assume that push notifications will make it to your app—their delivery isn’t guaranteed, even if the user doesn’t “close” the alert a notification brings up. Your server should have the authoritative state of whatever notifications your app needs to display when it launches, and the app should check that state regardless of whether it’s launched from a notification or not; one reason for this is that if your app receives multiple notifications while in the background, only one of those notifications will get delivered to the app when the user chooses to view it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号