2025-07-21 15:46:30 +08:00
|
|
|
|
import UIKit
|
2025-08-21 10:50:38 +08:00
|
|
|
|
import Flutter
|
|
|
|
|
|
|
|
|
|
// Add these two import lines
|
|
|
|
|
import TIMPush
|
|
|
|
|
import tencent_cloud_chat_push
|
|
|
|
|
|
|
|
|
|
// Add `, TIMPushDelegate` to the following line
|
|
|
|
|
@UIApplicationMain
|
|
|
|
|
@objc class AppDelegate: FlutterAppDelegate, TIMPushDelegate {
|
|
|
|
|
override func application(
|
|
|
|
|
_ application: UIApplication,
|
|
|
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
|
|
|
) -> Bool {
|
|
|
|
|
GeneratedPluginRegistrant.register(with: self)
|
|
|
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// To be deprecated,please use the new field businessID below.
|
|
|
|
|
@objc func offlinePushCertificateID() -> Int32 {
|
|
|
|
|
return TencentCloudChatPushFlutterModal.shared.offlinePushCertificateID();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add this function
|
|
|
|
|
@objc func businessID() -> Int32 {
|
|
|
|
|
return TencentCloudChatPushFlutterModal.shared.businessID();
|
|
|
|
|
}
|
2025-07-21 15:46:30 +08:00
|
|
|
|
|
2025-08-21 10:50:38 +08:00
|
|
|
|
// Add this function
|
|
|
|
|
@objc func applicationGroupID() -> String {
|
|
|
|
|
return TencentCloudChatPushFlutterModal.shared.applicationGroupID()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add this function
|
|
|
|
|
@objc func onRemoteNotificationReceived(_ notice: String?) -> Bool {
|
|
|
|
|
TencentCloudChatPushPlugin.shared.tryNotifyDartOnNotificationClickEvent(notice)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|