[英]Firebase notification not showing alert or banner and badge app icon in iOS Application
[英]Badge not showing on application icon iOS
修复此问题如果您在requestAuthorizationWithOptions
期间未通过UNAuthorizationOptionBadge
在您的应用程序通知设置中不显示徽章选项,最终无论您是从服务器端发送带有徽章的通知,您都不会收到徽章通知。
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;
[center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert + UNAuthorizationOptionSound + UNAuthorizationOptionBadge)
completionHandler:^(BOOL granted, NSError * _Nullable error) {
// Enable or disable features based on authorization.
[[Appboy sharedInstance] pushAuthorizationFromUserNotificationCenter:granted];
}];
如果您可以提供您正在使用的推送通知服务,或者您处理显示或删除徽章编号的代码,那就更好了,但根据您发送的图像,该应用程序似乎不支持徽章,否则声音下方会有一个徽章切换
参考: https://www.techwalla.com/articles/iphone-badges-are-not-working
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.