mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
// Copyright 2020 The Flutter team. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import Flutter
|
|
import UIKit
|
|
|
|
@main
|
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
lazy var engine: FlutterEngine = {
|
|
let result = FlutterEngine.init(name: "Books")
|
|
// This could be `run` earlier in the app to avoid the overhead of doing it the first time the
|
|
// engine is needed.
|
|
result.run()
|
|
return result
|
|
}()
|
|
|
|
func application(
|
|
_ application: UIApplication,
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
) -> Bool {
|
|
return true
|
|
}
|
|
|
|
func application(
|
|
_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession,
|
|
options: UIScene.ConnectionOptions
|
|
) -> UISceneConfiguration {
|
|
return UISceneConfiguration(
|
|
name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
|
}
|
|
|
|
func application(
|
|
_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>
|
|
) {
|
|
}
|
|
}
|