Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter Flatter Firebase云消息传递不';不要在Ios上显示徽章编号_Flutter_Firebase Cloud Messaging - Fatal编程技术网

Flutter Flatter Firebase云消息传递不';不要在Ios上显示徽章编号

Flutter Flatter Firebase云消息传递不';不要在Ios上显示徽章编号,flutter,firebase-cloud-messaging,Flutter,Firebase Cloud Messaging,我认为ios应该在收到通知后自动管理徽章号码。但这对我不起作用,我也找不到解决办法。我也申请了徽章的许可证,我已经拿到了,我在我的设置中看到了它。我只使用带有通知标签的firebase云通知库。有什么问题吗 我尝试使用: "apns": { "payload": { "aps": { "badge": 5 } } } 但这对我不起作用。如果可能的话,我想自动管理它 云

我认为ios应该在收到通知后自动管理徽章号码。但这对我不起作用,我也找不到解决办法。我也申请了徽章的许可证,我已经拿到了,我在我的设置中看到了它。我只使用带有通知标签的firebase云通知库。有什么问题吗

我尝试使用:

"apns": {
   "payload": {
     "aps": {
       "badge": 5
     }
   }
 }
但这对我不起作用。如果可能的话,我想自动管理它

云消息:
firebase\u消息:6.0.16

应用程序代表swift:

import UIKit
import Flutter
import Firebase
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GMSServices.provideAPIKey("key")
    GeneratedPluginRegistrant.register(with: self)
    if #available(iOS 10.0, *) {
      UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
        
    }
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

主屏幕应用程序图标上的徽章值。 如果未指定,则不会更改徽章。 如果设置为0,则会移除徽章

我认为ios不可能自动更改徽章号码