错误:Attempting to badge the application icon but haven't received permission from the user to badge the
错误原因:原因是因为在ios8中,设置应用的application badge value需要得到用户的许可。使用如下方法咨询用户是否许可应用设置application badge value
解决方案:
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
在这之前要判断是不是ios8系统,如果不是会报错
持续更新中................