diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index e04182a8a..c89921208 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -7,9 +7,15 @@ import UIKit _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + application.applicationIconBadgeNumber = 0 GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } + + override func applicationDidBecomeActive(_ application: UIApplication) { + application.applicationIconBadgeNumber = 0 + super.applicationDidBecomeActive(application) + } // 添加URL回调监听 override func application( diff --git a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift index cc7613322..9112f82f8 100644 --- a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift +++ b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift @@ -823,7 +823,6 @@ private class SetReminderHandler: FunctionHandler { let notificationContent = UNMutableNotificationContent() notificationContent.title = title notificationContent.body = content - notificationContent.badge = 1 // 关键配置:闹钟级声音(突破静音,最大音量) notificationContent.sound = UNNotificationSound.criticalSoundNamed(