2023-02-14 11:18:53 +01:00
|
|
|
import UIKit
|
|
|
|
import Flutter
|
2023-02-20 14:43:07 +01:00
|
|
|
import flutter_local_notifications
|
2023-02-14 11:18:53 +01:00
|
|
|
|
|
|
|
@UIApplicationMain
|
|
|
|
@objc class AppDelegate: FlutterAppDelegate {
|
|
|
|
override func application(
|
|
|
|
_ application: UIApplication,
|
|
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
|
|
) -> Bool {
|
2023-02-20 14:43:07 +01:00
|
|
|
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in
|
|
|
|
GeneratedPluginRegistrant.register(with: registry)
|
|
|
|
}
|
2023-02-14 11:18:53 +01:00
|
|
|
GeneratedPluginRegistrant.register(with: self)
|
2023-02-20 14:43:07 +01:00
|
|
|
if #available(iOS 10.0, *) {
|
|
|
|
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
|
|
|
|
}
|
2023-02-14 11:18:53 +01:00
|
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
|
|
}
|
|
|
|
}
|