简体   繁体   English

处理ios中的远程通知接收

[英]Handle Remote Notification Receive in ios

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 willPresent notification方法将被调用,并且我在用户点击横幅时处理了导航

When app is in background or closed completely 当应用程序在后台或完全关闭时

didReceive response will be called didReceive response将被调用

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. 感谢您的时间。

As far as I know, this process is completely managed by iOS that one cannot guarantee you differentiating the statuses. 据我所知,这一过程完全由iOS管理,无法保证您区分状态。 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. 然后,您可以随时阅读以了解应用程序的最新状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM