Attempting to badge the application icon but haven't received permission from the user to badge the
来源:互联网 发布:淘宝怎样下架宝贝 编辑:程序博客网 时间:2024/04/29 08:39
在ios8中,直接设置application badge value会出错
1 [[UIApplication sharedApplication] setApplicationIconBadgeNumber:count];
曝出” Attempting to badge the application icon but haven't received permission from the user to badge the application
“的错误。
原因是因为在ios8中,设置应用的application badge value需要得到用户的许可。使用如下方法咨询用户是否许可应用设置application badge value
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
程序运行时,会弹出提示框给用户
之后再通过
1 [[UIApplication sharedApplication] setApplicationIconBadgeNumber:count];
设置application badge value
0 0
- Attempting to badge the application icon but haven't received permission from the user to badge the
- Attempting to badge the application icon but haven't received permission from the user to badge the
- Attempting to badge the application icon but haven't received permission from the user to badge the
- Attempting to badge the application icon but haven't received permission from the user to badge the
- 解决Attempting to badge the application icon but haven't received permission from the user to badge th
- Swift之Attempting to badge the application icon but haven't received permission from the user to badg
- 【iOS开发-71】解决方案:Attempting to badge the application icon but haven't received permission from the...
- Attempting to badge the application icon but haven't received permission解决方案
- iOS开发错误之Attempting to badge the application icon but haven't received permiss
- iOS开发-71】解决方案:Attempting to badge the application icon but haven't received permiss...
- Attempting to badge the application icon but haven't received permiss...
- 解决方案:Attempting to badge the application icon but haven't received permiss...
- Attempting to badge the application icon but haven't received permiss
- 应用图标提示设置applicationIconBadgeNumber Attempting to badge the application icon but haven't
- iOS 注册通知失败 with an alert but haven't received permission from the user to display alerts
- Is there a way to add a badge to an application icon in Android?
- How to set the QT Application icon in the windows.
- [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id.
- 开发过程中学习到的一些快捷键
- 20判断用户是否绑定了sim卡
- php 中的 依赖注入(DI) 和 控制反转(IoC)
- E: 无法获得锁 /var/lib/apt/lists/lock - open (11: 资源暂时不可用)
- yum 失败(This system is not registered with RHN.)解决方法
- Attempting to badge the application icon but haven't received permission from the user to badge the
- ArcEngine 介绍
- Fisher Vector 学习
- hdoj Largest prime factor
- unity之抽象类
- An error was encountered while running (Domain = FBSOpenApplicationErrorDomain, Code = 4)
- 5款免费在线软件行为分析(在线沙盘)
- IOS中的音频格式转换
- 演示2