Skip to content

Instantly share code, notes, and snippets.

@AbedElazizShe
Created December 8, 2020 12:08
Show Gist options
  • Save AbedElazizShe/f9a826a02f7a7e908d31a2595ab31931 to your computer and use it in GitHub Desktop.
Save AbedElazizShe/f9a826a02f7a7e908d31a2595ab31931 to your computer and use it in GitHub Desktop.
AppDelegate
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
lazy var flutterEngine = FlutterEngine(name: "MyApp")
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Runs the default Dart entrypoint with a default Flutter route.
flutterEngine.run()
// Used to connect plugins (only if you have plugins with iOS platform code).
GeneratedPluginRegistrant.register(with: self.flutterEngine)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment