【发布时间】:2014-05-19 22:32:37
【问题描述】:
教程"Here" 有点混乱,所以想知道是否有人已经实现了这个。该应用正在使用“UA's autobadge”功能,并且在应用打开时会清除徽章编号,但不会重置为 0。因此,当有新通知到达时,它会永远增加徽章编号。
我在didFinishLaunchingWithOptions 中的代码是:
UAConfig *config = [UAConfig defaultConfig];
[config setAutomaticSetupEnabled:NO];
[[UAPush shared] setNotificationTypes:UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert];
[[UAPush shared] registerForRemoteNotifications];
[UAirship takeOff:config];
[[UAPush shared] setAutobadgeEnabled:YES];
[[UAPush shared] resetBadge];
[[UIApplication sharedApplication] cancelAllLocalNotifications];
我做错了什么微不足道的事情吗?有没有人解决这个问题?
提前致谢!
【问题讨论】:
标签: ios objective-c apple-push-notifications urbanairship.com