2026-02-24 18:18:42 +08:00
|
|
|
import Flutter
|
2026-03-20 01:30:34 +08:00
|
|
|
import flutter_local_notifications
|
2026-02-24 18:18:42 +08:00
|
|
|
import UIKit
|
2026-03-18 17:03:22 +08:00
|
|
|
import UserNotifications
|
2026-02-24 18:18:42 +08:00
|
|
|
|
|
|
|
|
@main
|
|
|
|
|
@objc class AppDelegate: FlutterAppDelegate {
|
|
|
|
|
override func application(
|
|
|
|
|
_ application: UIApplication,
|
|
|
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
|
|
|
) -> Bool {
|
2026-03-20 01:30:34 +08:00
|
|
|
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { registry in
|
|
|
|
|
GeneratedPluginRegistrant.register(with: registry)
|
|
|
|
|
}
|
2026-02-24 18:18:42 +08:00
|
|
|
GeneratedPluginRegistrant.register(with: self)
|
2026-03-18 17:03:22 +08:00
|
|
|
if #available(iOS 10.0, *) {
|
|
|
|
|
UNUserNotificationCenter.current().delegate = self
|
|
|
|
|
}
|
2026-02-24 18:18:42 +08:00
|
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
|
|
|
}
|
|
|
|
|
}
|