TF-1248: enable handle push notification IOS

This commit is contained in:
ManhNTX
2022-12-10 07:53:07 +07:00
committed by Dat H. Pham
parent 57a036299a
commit 986414feb1
7 changed files with 56 additions and 45 deletions
+11
View File
@@ -2,6 +2,7 @@ import UIKit
import Flutter
import flutter_downloader
import receive_sharing_intent
import flutter_local_notifications
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@@ -9,7 +10,17 @@ import receive_sharing_intent
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in
GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
}
GeneratedPluginRegistrant.register(with: self)
FlutterDownloaderPlugin.setPluginRegistrantCallback { registry in
if (!registry.hasPlugin("FlutterDownloaderPlugin")) {
FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin")!)
+2 -2
View File
@@ -39,8 +39,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>FirebaseMessagingAutoInitEnabled</key>
<false/>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>0</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>