AppDelegate.swift 832 B

123456789101112131415161718
  1. import UIKit
  2. import Flutter
  3. @UIApplicationMain
  4. @objc class AppDelegate: FlutterAppDelegate {
  5. override func application(
  6. _ application: UIApplication,
  7. didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  8. ) -> Bool {
  9. GeneratedPluginRegistrant.register(with: self)
  10. QMapServices.shared().apiKey = "OOZBZ-NHIWS-OCAOO-6VB3W-ROSBH-ZYB7Z"
  11. QMSSearchServices.shared()?.apiKey = "OOZBZ-NHIWS-OCAOO-6VB3W-ROSBH-ZYB7Z"
  12. let registrar:FlutterPluginRegistrar = self.registrar(forPlugin: "plugins.flutter.io/custom_platform_view_plugin")!
  13. let factory = MyFlutterViewFactory(messenger: registrar.messenger())
  14. registrar.register(factory, withId: "plugins.flutter.io/custom_platform_view")
  15. return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  16. }
  17. }