iOs:如何考虑应用程序激活时收到的所有通知
我正在为我的 iOS 应用程序设置 Apple 推送通知。
如果应用程序未运行(或在后台)时收到多个通知,那么当应用程序(重新)启动时如何考虑所有收到的通知?
I'm setting up Apple push notification for my iOS app.
If several notification are received when the app is not running (or in background), how can all received notifications be taken into account when the app (re)starts ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 iOS 5 中,推送通知累积在托盘中。
在应用程序中:didFinishLaunchingWithOptions:
使用 UIApplicationLaunchOptionsRemoteNotificationKey。这将为您提供通知字典。
也许这可以帮助你 -
In iOS 5 the push notifications accumulate in the tray.
In application:didFinishLaunchingWithOptions:
use UIApplicationLaunchOptionsRemoteNotificationKey. This will give you the notification dictionary.
May be this can help you -
无法以编程方式获取推送通知。
处理这些通知的唯一方法是实现
application:didFinishLaunchingWithOptions:
,它将包含有关用户点击的通知的数据。实现您想要的效果的好方法是拥有一个您自己的 Web 服务,当您的应用程序进入前台时调用该服务。
There is no way of getting push notifications programmatically.
The only way to handle these notifications is to implement
application:didFinishLaunchingWithOptions:
which will contain data about the notification that the user tapped.The good way to achieve what you want is to have a web service of your own that you call when your application enters foreground.