1
0
mirror of https://github.com/flutter/samples.git synced 2026-07-16 22:12:42 +00:00

Added iOS example for add-to-app Pigeon (#722)

This commit is contained in:
gaaclarke
2021-03-03 21:04:28 -08:00
committed by GitHub
parent eab215f1b7
commit 5adf66ba65
31 changed files with 1440 additions and 188 deletions

View File

@@ -0,0 +1,37 @@
// 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>
) {
}
}