decoder2

Untitled

Jul 19th, 2021
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. import UIKit
  2. import Flutter
  3. import flutter_background_service // add this
  4.  
  5. @UIApplicationMain
  6. @objc class AppDelegate: FlutterAppDelegate {
  7. /// add this
  8. static func registerPlugins(with registry: FlutterPluginRegistry) {
  9. GeneratedPluginRegistrant.register(with: registry)
  10. }
  11.  
  12. override func application(
  13. _ application: UIApplication,
  14. didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  15. ) -> Bool {
  16.  
  17. AppDelegate.registerPlugins(with: self)
  18. SwiftFlutterBackgroundServicePlugin.setPluginRegistrantCallback { registry in
  19. AppDelegate.registerPlugins(with: registry)
  20. }
  21.  
  22. return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment