mirror of
https://github.com/flutter/samples.git
synced 2026-06-25 07:38:26 +00:00
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>
This commit is contained in:
committed by
GitHub
parent
b538521864
commit
effe13307c
@@ -14,7 +14,8 @@ import '../ui/auth/login/widgets/login_screen.dart';
|
|||||||
import '../ui/auth/logout/view_models/logout_viewmodel.dart';
|
import '../ui/auth/logout/view_models/logout_viewmodel.dart';
|
||||||
import '../ui/booking/view_models/booking_viewmodel.dart';
|
import '../ui/booking/view_models/booking_viewmodel.dart';
|
||||||
import '../ui/booking/widgets/booking_screen.dart';
|
import '../ui/booking/widgets/booking_screen.dart';
|
||||||
import '../ui/home/widgets/home_screen_container.dart';
|
import '../ui/home/view_models/home_viewmodel.dart';
|
||||||
|
import '../ui/home/widgets/home_screen.dart';
|
||||||
import '../ui/results/view_models/results_viewmodel.dart';
|
import '../ui/results/view_models/results_viewmodel.dart';
|
||||||
import '../ui/results/widgets/results_screen.dart';
|
import '../ui/results/widgets/results_screen.dart';
|
||||||
import '../ui/search_form/view_models/search_form_viewmodel.dart';
|
import '../ui/search_form/view_models/search_form_viewmodel.dart';
|
||||||
|
|||||||
@@ -45993,9 +45993,7 @@ class ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase {
|
|||||||
ffi.UnsignedLong,
|
ffi.UnsignedLong,
|
||||||
ffi.Pointer<ffi.Bool>,
|
ffi.Pointer<ffi.Bool>,
|
||||||
)
|
)
|
||||||
>(
|
>(_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline)
|
||||||
_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline,
|
|
||||||
)
|
|
||||||
.cast(),
|
.cast(),
|
||||||
_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure(
|
_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure(
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ skip_ci:
|
|||||||
- add_to_app/multiple_flutters/multiple_flutters_module
|
- add_to_app/multiple_flutters/multiple_flutters_module
|
||||||
- add_to_app/plugin/flutter_module_using_plugin
|
- add_to_app/plugin/flutter_module_using_plugin
|
||||||
- add_to_app/prebuilt_module/flutter_module
|
- add_to_app/prebuilt_module/flutter_module
|
||||||
# remove after 3.44 release
|
|
||||||
- cupertino_gallery
|
- cupertino_gallery
|
||||||
|
|
||||||
skip_ci_beta:
|
skip_ci_beta:
|
||||||
- material_3_demo
|
# - sample_name_to_skip
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
import UIKit
|
|
||||||
import Flutter
|
import Flutter
|
||||||
|
import UIKit
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||||
|
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
@@ -24,6 +26,29 @@
|
|||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>UIApplicationSceneManifest</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIApplicationSupportsMultipleScenes</key>
|
||||||
|
<false/>
|
||||||
|
<key>UISceneConfigurations</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIWindowSceneSessionRoleApplication</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>UISceneClassName</key>
|
||||||
|
<string>UIWindowScene</string>
|
||||||
|
<key>UISceneConfigurationName</key>
|
||||||
|
<string>flutter</string>
|
||||||
|
<key>UISceneDelegateClassName</key>
|
||||||
|
<string>FlutterSceneDelegate</string>
|
||||||
|
<key>UISceneStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
@@ -43,9 +68,5 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Reference in New Issue
Block a user