2022-02-03 18:06:44 +02:00
|
|
|
import UIKit
|
2023-02-21 14:28:52 +02:00
|
|
|
import shared_preferences_foundation
|
2022-02-03 18:06:44 +02:00
|
|
|
import Flutter
|
2023-02-20 07:59:50 +02:00
|
|
|
import BackgroundTasks
|
|
|
|
import path_provider_ios
|
|
|
|
import photo_manager
|
2023-02-28 18:22:18 +02:00
|
|
|
import permission_handler_apple
|
2022-02-03 18:06:44 +02:00
|
|
|
|
|
|
|
@UIApplicationMain
|
|
|
|
@objc class AppDelegate: FlutterAppDelegate {
|
2023-02-20 07:59:50 +02:00
|
|
|
|
2022-02-03 18:06:44 +02:00
|
|
|
override func application(
|
|
|
|
_ application: UIApplication,
|
|
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
|
|
) -> Bool {
|
2023-02-20 07:59:50 +02:00
|
|
|
|
2023-08-06 04:40:50 +02:00
|
|
|
// Required for flutter_local_notification
|
|
|
|
if #available(iOS 10.0, *) {
|
|
|
|
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
|
|
|
|
}
|
|
|
|
|
2023-02-20 07:59:50 +02:00
|
|
|
GeneratedPluginRegistrant.register(with: self)
|
|
|
|
BackgroundServicePlugin.registerBackgroundProcessing()
|
|
|
|
|
|
|
|
BackgroundServicePlugin.register(with: self.registrar(forPlugin: "BackgroundServicePlugin")!)
|
|
|
|
|
|
|
|
BackgroundServicePlugin.setPluginRegistrantCallback { registry in
|
|
|
|
if !registry.hasPlugin("org.cocoapods.path-provider-ios") {
|
|
|
|
FLTPathProviderPlugin.register(with: registry.registrar(forPlugin: "org.cocoapods.path-provider-ios")!)
|
|
|
|
}
|
|
|
|
|
|
|
|
if !registry.hasPlugin("org.cocoapods.photo-manager") {
|
|
|
|
PhotoManagerPlugin.register(with: registry.registrar(forPlugin: "org.cocoapods.photo-manager")!)
|
|
|
|
}
|
2023-02-21 14:28:52 +02:00
|
|
|
|
|
|
|
if !registry.hasPlugin("org.cocoapods.shared-preferences-foundation") {
|
|
|
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "org.cocoapods.shared-preferences-foundation")!)
|
|
|
|
}
|
2023-02-28 18:22:18 +02:00
|
|
|
|
|
|
|
if !registry.hasPlugin("org.cocoapods.permission-handler-apple") {
|
|
|
|
PermissionHandlerPlugin.register(with: registry.registrar(forPlugin: "org.cocoapods.permission-handler-apple")!)
|
|
|
|
}
|
2023-02-20 07:59:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
2022-02-03 18:06:44 +02:00
|
|
|
}
|
2023-02-20 07:59:50 +02:00
|
|
|
|
2022-02-03 18:06:44 +02:00
|
|
|
}
|