Replyable message notification (w.i.p)

This commit is contained in:
2024-12-21 17:15:14 +08:00
parent dc78f39969
commit eb125fc436
5 changed files with 59 additions and 15 deletions

View File

@ -5,18 +5,22 @@ import workmanager
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
WorkmanagerPlugin.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
}
let notifyDelegate = NotifyDelegate()
UIApplication.shared.setMinimumBackgroundFetchInterval(TimeInterval(60*5))
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
WorkmanagerPlugin.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
}
UIApplication.shared.setMinimumBackgroundFetchInterval(TimeInterval(60*5))
UNUserNotificationCenter.current().delegate = notifyDelegate
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}