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


版权声明:

相关文章推荐

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

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

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

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

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

转自:http://www.tuicool.com/articles/FjAF7za (1)原因 一切都是iOS8捣的鬼。您如果把模拟器换成iOS7.1或者更早的,就不会有这个问题。而现在...

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

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

阿录帮帮忙—memcached整合spring时:“attempting to get SockIO from uninitialized pool!”问题的解决

memcached整合spring时:“attempting to get SockIO from uninitialized pool!”问题的解决

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications ...

严重: The web application [/] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregis

tomcat 6.0.32 jdk jdk1.6.0_24 SSH 在本地Eclipse MyEclipse 编译通过,一台测试服务器上默认tomcat/webapp/ 路径下war d...
  • bayaci
  • bayaci
  • 2011-07-30 14:42
  • 10023

关于搭建环境时的异常The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to un

mybatis一系列配置文件生成之后,写了个demo进行测试,在controller里面注入了service然后进行代码调试,发现启动tomcat的时候,报了一个异常 The web applica...

How to create a Symbian application icon (SVG)

视频教程: http://www.developer.nokia.com/Resources/Library/Design_and_UX/designing-for-nokia-platform...

深度解决 SecurityException: User has not given permission to device UsbDevice

深度解决 SecurityException: User has not given permission to device UsbDevice在Android上直接使用USB端口会出现如题权限相关...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

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