forked from ABausG/home_widget
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppDelegate.swift
More file actions
28 lines (23 loc) · 834 Bytes
/
AppDelegate.swift
File metadata and controls
28 lines (23 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Flutter
import UIKit
import home_widget
import workmanager
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
UIApplication.shared.setMinimumBackgroundFetchInterval(TimeInterval(60 * 15))
WorkmanagerPlugin.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 17, *) {
HomeWidgetBackgroundWorker.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
}
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}