Attempting to badge the application icon but haven't received permission from the user to badge the

原创 2015年07月08日 15:04:39

报错Attempting to badge the application icon but haven't received permission from the user to badge the application


因为在iOS 7.1之后,设置应用的application badge value需要得到用户的许可,需要判读iOS版本


#ifdef SUPPORT_IOS8

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {


    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];


    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];

   

}

#endif


From Microservices to Data Microservices

pivotal云原生活动将与您一起遍览云原生软件的源起 、发展以及交付方法。我们将与您分享云原生软件组织的能力和预期成果,内容涵盖基础设施自动化、容器编排和生命周期管理及应用程序框架。
  • 2016年08月08日 09:18

【iOS开发-71】解决方案:Attempting to badge the application icon but haven't received permission from the...

大体意思是,我们先定义一个“通知设置”,然后把这个“通知设置”注册到“用户通知设置”里面,而注册到“用户通知设置”里面的那些“通知设置”,都是用框框弹出来让用户决定是否接受这种通知的。...
  • wsb200514
  • wsb200514
  • 2014-11-11 10:03:22
  • 5749

iOS8 - - 一些适配

1:Attempting to badge the application icon but haven't received permission from the user to badge th...
  • u011662420
  • u011662420
  • 2014-10-21 00:14:44
  • 1766

iOS8系统下的无法弹出通知

在iOS8系统开发使用本地通知时,通知无法弹出,会出现如下的提示Log: Attempting to schedule a local notification ,with an alert but...
  • wbw1985
  • wbw1985
  • 2015-02-10 17:19:41
  • 10369

Attempting to badge the application icon but haven't received permission解决方案

(1)原因 一切都是iOS8捣的鬼。您如果把模拟器换成iOS7.1或者更早的,就不会有这个问题。而现在在iOS8中要实现badge、alert和sound等都需要用户同意才能,因为这些都算做Noti...
  • linan5231
  • linan5231
  • 2015-09-15 12:22:33
  • 235

解决Attempting to badge the application icon but haven't received permission from the user to badge th

(1)原因 一切都是iOS8捣的鬼。您如果把模拟器换成iOS7.1或者更早的,就不会有这个问题。而现在在iOS8中要实现badge、alert和sound等都需要用户同意才能,因为这些都算做No...
  • HDFQQ188816190
  • HDFQQ188816190
  • 2015-10-08 17:21:29
  • 361

iOS 注册通知失败 with an alert but haven't received permission from the user to display alerts

在iOS8以后使用通知要先注册
  • soindy
  • soindy
  • 2015-03-19 14:10:55
  • 863

解决方案:Attempting to badge the application icon but haven't received permiss...

(1)原因一切都是iOS8捣的鬼。您如果把模拟器换成iOS7.1或者更早的,就不会有这个问题。而现在在iOS8中要实现badge、alert和 sound等都需要用户同意才能,因为这些都算做Notif...
  • lincsdnnet
  • lincsdnnet
  • 2016-02-27 15:08:51
  • 202

iOS开发错误之Attempting to badge the application icon but haven't received permiss

(1)原因 一切都是iOS8捣的鬼。您如果把模拟器换成iOS7.1或者更早的,就不会有这个问题。而现在在iOS8中要实现badge、alert和sound等都需要用户同意才能,因为这些都算做Noti...
  • sky_2016
  • sky_2016
  • 2015-02-26 21:11:21
  • 342

Attempting to badge the application icon but haven't received permiss

(1)原因 一切都是iOS8捣的鬼。您如果把模拟器换成iOS7.1或者更早的,就不会有这个问题。而现在在iOS8中要实现badge、alert和sound等都需要用户同意才能,因为这些都算做No...
  • stubbornness1219
  • stubbornness1219
  • 2016-03-28 15:17:50
  • 342
收藏助手
不良信息举报
您举报文章:Attempting to badge the application icon but haven't received permission from the user to badge the
举报原因:
原因补充:

(最多只允许输入30个字)