mirror of https://github.com/flutter/samples.git
Migrate testing_app to UIScene lifecycle (#2836)
## Summary [](https://www.talabat.com) [](https://github.com/search?q=org%3Aflutter+talabat&type=pullrequests) - Migrate `testing_app` iOS project to the UIScene lifecycle as per the [migration guide](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate) - Update `AppDelegate.swift` to use `@main`, `FlutterImplicitEngineDelegate`, and move plugin registration to `didInitializeImplicitFlutterEngine` - Add `UIApplicationSceneManifest` to `Info.plist` Part of flutter/flutter#176957 ## Test plan - [x] Ran `testing_app` on iOS simulator — app launches and works correctly --------- Co-authored-by: Eric Windmill <eric@ericwindmill.com>pull/2866/head
parent
b538521864
commit
effe13307c
@ -1,13 +1,16 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue