[英]iOS 8 icon badge not updating when receiving remote notification
我正在开发使用远程通知的iOS应用。 一切正常,但我注意到收到通知时图标徽章没有显示任何数字。
我以这种方式在AppDelegate中请求权限:
[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[application registerForRemoteNotifications];
还有什么我需要做的吗?
谢谢!
推送通知有效负载应包含带有"badge"
键的值,该值将自动更新应用程序图标的徽章。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.