Skip to content

Commit effe133

Browse files
Migrate testing_app to UIScene lifecycle (#2836)
## Summary [![talabat.com contributions](https://img.shields.io/badge/talabat.com-contributions-FF5A00?style=flat&logo=flutter&logoColor=white)](https://www.talabat.com) [![Talabat Flutter PRs](https://img.shields.io/badge/Talabat_Flutter_PRs-26%20merged-97ca00?style=flat&logo=flutter&logoColor=white)](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 <[email protected]>
1 parent b538521 commit effe133

5 files changed

Lines changed: 37 additions & 14 deletions

File tree

‎compass_app/app/lib/routing/router.dart‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import '../ui/auth/login/widgets/login_screen.dart';
1414
import '../ui/auth/logout/view_models/logout_viewmodel.dart';
1515
import '../ui/booking/view_models/booking_viewmodel.dart';
1616
import '../ui/booking/widgets/booking_screen.dart';
17-
import '../ui/home/widgets/home_screen_container.dart';
17+
import '../ui/home/view_models/home_viewmodel.dart';
18+
import '../ui/home/widgets/home_screen.dart';
1819
import '../ui/results/view_models/results_viewmodel.dart';
1920
import '../ui/results/widgets/results_screen.dart';
2021
import '../ui/search_form/view_models/search_form_viewmodel.dart';

‎pedometer/lib/pedometer_bindings_generated.dart‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45993,9 +45993,7 @@ class ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase {
4599345993
ffi.UnsignedLong,
4599445994
ffi.Pointer<ffi.Bool>,
4599545995
)
45996-
>(
45997-
_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline,
45998-
)
45996+
>(_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline)
4599945997
.cast(),
4600045998
_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure(
4600145999
(

‎pubspec.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ skip_ci:
5050
- add_to_app/multiple_flutters/multiple_flutters_module
5151
- add_to_app/plugin/flutter_module_using_plugin
5252
- add_to_app/prebuilt_module/flutter_module
53-
# remove after 3.44 release
5453
- cupertino_gallery
5554

5655
skip_ci_beta:
57-
- material_3_demo
56+
# - sample_name_to_skip
57+
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import UIKit
21
import Flutter
2+
import UIKit
33

4-
@UIApplicationMain
5-
@objc class AppDelegate: FlutterAppDelegate {
4+
@main
5+
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
66
override func application(
77
_ application: UIApplication,
88
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
99
) -> Bool {
10-
GeneratedPluginRegistrant.register(with: self)
1110
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
1211
}
12+
13+
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
14+
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
15+
}
1316
}

‎testing_app/ios/Runner/Info.plist‎

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleDisplayName</key>
@@ -24,6 +26,29 @@
2426
<string>$(FLUTTER_BUILD_NUMBER)</string>
2527
<key>LSRequiresIPhoneOS</key>
2628
<true/>
29+
<key>UIApplicationSceneManifest</key>
30+
<dict>
31+
<key>UIApplicationSupportsMultipleScenes</key>
32+
<false/>
33+
<key>UISceneConfigurations</key>
34+
<dict>
35+
<key>UIWindowSceneSessionRoleApplication</key>
36+
<array>
37+
<dict>
38+
<key>UISceneClassName</key>
39+
<string>UIWindowScene</string>
40+
<key>UISceneConfigurationName</key>
41+
<string>flutter</string>
42+
<key>UISceneDelegateClassName</key>
43+
<string>FlutterSceneDelegate</string>
44+
<key>UISceneStoryboardFile</key>
45+
<string>Main</string>
46+
</dict>
47+
</array>
48+
</dict>
49+
</dict>
50+
<key>UIApplicationSupportsIndirectInputEvents</key>
51+
<true/>
2752
<key>UILaunchStoryboardName</key>
2853
<string>LaunchScreen</string>
2954
<key>UIMainStoryboardFile</key>
@@ -43,9 +68,5 @@
4368
</array>
4469
<key>UIViewControllerBasedStatusBarAppearance</key>
4570
<false/>
46-
<key>CADisableMinimumFrameDurationOnPhone</key>
47-
<true/>
48-
<key>UIApplicationSupportsIndirectInputEvents</key>
49-
<true/>
5071
</dict>
5172
</plist>

0 commit comments

Comments
 (0)