iOS background widget fetching

This commit is contained in:
2024-12-21 11:56:18 +08:00
parent 8db6513eef
commit 73468c5c6d
13 changed files with 202 additions and 94 deletions

View File

@ -1,6 +1,8 @@
import Flutter
import UIKit
import workmanager
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
@ -9,6 +11,12 @@ import UIKit
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
WorkmanagerPlugin.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
}
UIApplication.shared.setMinimumBackgroundFetchInterval(TimeInterval(60*5))
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}