39 lines
1.3 KiB
Swift
39 lines
1.3 KiB
Swift
import UIKit
|
||
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();
|
||
}
|
||
|
||
// 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
|
||
}
|
||
} |