推送通知未打开应用程序“带选项”如果在呈现时没有立即单击
我在这里遇到了问题。如果我在应用程序运行时执行此操作,或者在应用程序关闭时单击“查看”,则我可以很好地接收、捕获和保存 APNS 消息。
我遇到的问题是..如果应用程序没有运行,并且我收到一条 APNS 消息,并选择稍后通过选择“关闭”查看它...下次我打开应用程序时,应用程序不会打开“与选项”。因此,APNS消息丢失。如果在“查看”APNS 消息之前屏幕锁定,也会发生同样的情况。
我该如何处理这个问题?
提前致谢!
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 running 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不要假设推送通知会发送到您的应用程序 - 即使用户没有“关闭”通知弹出的警报,也不能保证它们的发送。您的服务器应该具有应用程序启动时需要显示的任何通知的权威状态,并且应用程序应该检查该状态,无论它是否从通知启动;原因之一是,如果您的应用程序在后台收到多个通知,则当用户选择查看时,只有其中一个通知会发送到应用程序。
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.