Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 应用程序关闭时如何接收推送通知?_Iphone_Ios4_Notifications_Push_Apple Push Notifications - Fatal编程技术网

Iphone 应用程序关闭时如何接收推送通知?

Iphone 应用程序关闭时如何接收推送通知?,iphone,ios4,notifications,push,apple-push-notifications,Iphone,Ios4,Notifications,Push,Apple Push Notifications,我正在为我的应用程序实现推送通知功能,除了一个案例外,其他一切都运行顺利 情况是这样的: 当应用程序关闭(也不在后台运行)并且用户收到推送通知时。用户点击“关闭”,然后决定转到应用程序。我想让我的应用程序代理知道之前收到的推送通知,但我不知道如何检查。我知道我可以在didLaunch中调用函数。。。但是,当用户决定点击“查看”按钮而不是“关闭”按钮时,这种方法就起作用了 有什么提示吗 谢谢 真的,答案是不用麻烦了。您永远无法保证已收到警报,因此,如果依赖于此,很不幸,您将在以后遇到问题。apns

我正在为我的应用程序实现推送通知功能,除了一个案例外,其他一切都运行顺利

情况是这样的: 当应用程序关闭(也不在后台运行)并且用户收到推送通知时。用户点击“关闭”,然后决定转到应用程序。我想让我的应用程序代理知道之前收到的推送通知,但我不知道如何检查。我知道我可以在didLaunch中调用函数。。。但是,当用户决定点击“查看”按钮而不是“关闭”按钮时,这种方法就起作用了

有什么提示吗


谢谢

真的,答案是不用麻烦了。您永远无法保证已收到警报,因此,如果依赖于此,很不幸,您将在以后遇到问题。apns不保证设备会收到有效负载