SimpleCloudNotifier/flutter/ios/Runner/AppDelegate.swift

28 lines
820 B
Swift
Raw Normal View History

2024-02-10 18:29:41 +01:00
import UIKit
import Flutter
2024-06-15 21:29:51 +02:00
import flutter_local_notifications
2024-02-10 18:29:41 +01:00
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
2024-06-15 21:29:51 +02:00
2024-02-10 18:29:41 +01:00
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
2024-06-15 21:29:51 +02:00
// This is required to make any communication available in the action isolate.
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in
GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
2024-02-10 18:29:41 +01:00
GeneratedPluginRegistrant.register(with: self)
2024-06-15 21:29:51 +02:00
2024-02-10 18:29:41 +01:00
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
2024-06-15 21:29:51 +02:00
2024-02-10 18:29:41 +01:00
}