Skip to content

Commit d4e7f9a

Browse files
authored
iOS: Migrate the scenario app to UIScene (flutter#190649)
Apps that haven't adopted the UIScene life cycle do not run on iOS 27. This updates the scenarios app to include a `UIApplicationSceneManifest` in the app's `Info.plist` and moves the window setup into a `SceneDelegate` that subclasses `FlutterSceneDelegate`, similar to what we do in `dev/integration_tests/ios_add2app_uiscene`. We create the window from the connected `UIWindowScene` and make it key before calling to super, which is where the engine forwards the connection event on to plugins. I've kept the bits that aren't UI setup in `AppDelegate`: the guard against `--enable-software-rendering` and the `ContinuousTexture` registration, which we register against the implicit engine rather than the one the scenario builds. Since the window now belongs to the scene delegate rather than the application delegate, the tests that reached it via `UIApplication.sharedApplication.delegate.window` have been updated to use the new `SceneDelegate.mainWindow` instead. They assert that it is non-nil before using it: with no connected scene, presenting on the root view controller, assigning it, and rendering the layer are all silent no-ops that surface as an expectation timeout rather than as a missing window. Because it's still there, `Info_Skia.plist` gets the same manifest to stay in sync with `Info.plist`, from which it differs only in `FLTEnableImpeller`; that said we no longer support a Skia backend, so I'll delete this in a followup. Issue: flutter#188336 <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent afc82b8 commit d4e7f9a

9 files changed

Lines changed: 336 additions & 232 deletions

File tree

‎engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
246B4E4222E3B5F700073EBF /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; };
2727
246B4E4622E3B61000073EBF /* ../../Flutter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* ../../Flutter.xcframework */; };
2828
248D76CC22E388370012F0C1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76CB22E388370012F0C1 /* AppDelegate.m */; };
29+
0D5CE1B22E4A000200AA0003 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D5CE1B12E4A000200AA0002 /* SceneDelegate.m */; };
2930
248D76D422E388380012F0C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 248D76D322E388380012F0C1 /* Assets.xcassets */; };
3031
248D76DA22E388380012F0C1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76D922E388380012F0C1 /* main.m */; };
3132
248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76EE22E388380012F0C1 /* PlatformViewUITests.m */; };
@@ -199,6 +200,8 @@
199200
248D76C722E388370012F0C1 /* Scenarios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Scenarios.app; sourceTree = BUILT_PRODUCTS_DIR; };
200201
248D76CA22E388370012F0C1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
201202
248D76CB22E388370012F0C1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
203+
0D5CE1B02E4A000200AA0001 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
204+
0D5CE1B12E4A000200AA0002 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
202205
248D76D322E388380012F0C1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
203206
248D76D822E388380012F0C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
204207
248D76D922E388380012F0C1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -339,6 +342,8 @@
339342
24F1FB87230B4579005ACE7C /* TextPlatformView.m */,
340343
248D76CA22E388370012F0C1 /* AppDelegate.h */,
341344
248D76CB22E388370012F0C1 /* AppDelegate.m */,
345+
0D5CE1B02E4A000200AA0001 /* SceneDelegate.h */,
346+
0D5CE1B12E4A000200AA0002 /* SceneDelegate.m */,
342347
248D76D322E388380012F0C1 /* Assets.xcassets */,
343348
248D76D822E388380012F0C1 /* Info.plist */,
344349
F72114B628EF99F500184A2D /* Info_Skia.plist */,
@@ -688,6 +693,7 @@
688693
68D4017D2564859300ECD91A /* ContinuousTexture.m in Sources */,
689694
24F1FB89230B4579005ACE7C /* TextPlatformView.m in Sources */,
690695
248D76CC22E388370012F0C1 /* AppDelegate.m in Sources */,
696+
0D5CE1B22E4A000200AA0003 /* SceneDelegate.m in Sources */,
691697
0A57B3BF2323C74200DD9521 /* FlutterEngine+ScenariosTest.m in Sources */,
692698
0A57B3BD2323C4BD00DD9521 /* ScreenBeforeFlutter.m in Sources */,
693699
);

‎engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/Scenarios/AppDelegate.m‎

Lines changed: 1 addition & 219 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,6 @@
55
#import "AppDelegate.h"
66

77
#import "ContinuousTexture.h"
8-
#import "FlutterEngine+ScenariosTest.h"
9-
#import "ScreenBeforeFlutter.h"
10-
#import "TextPlatformView.h"
11-
12-
// A UIViewController that sets YES for its preferedStatusBarHidden property.
13-
// StatusBar includes current time, which is non-deterministic. This ViewController
14-
// removes the StatusBar to make the screenshot deterministic.
15-
@interface NoStatusBarViewController : UIViewController
16-
17-
@end
18-
19-
@interface FlutterEngine ()
20-
@property(nonatomic, strong) FlutterMethodChannel* statusBarChannel;
21-
@end
22-
23-
@implementation NoStatusBarViewController
24-
- (BOOL)prefersStatusBarHidden {
25-
return YES;
26-
}
27-
@end
28-
29-
// The FlutterViewController version of NoStatusBarViewController
30-
@interface NoStatusBarFlutterViewController : FlutterViewController
31-
32-
@end
33-
34-
@implementation NoStatusBarFlutterViewController
35-
- (BOOL)prefersStatusBarHidden {
36-
return YES;
37-
}
38-
@end
398

409
@implementation AppDelegate
4110

@@ -46,199 +15,12 @@ - (BOOL)application:(UIApplication*)application
4615
@throw @"--enable-software-rendering is unsupported in iOS scenario tests";
4716
}
4817

49-
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
50-
if ([processArguments containsObject:@"--maskview-blocking"]) {
51-
self.window.tintColor = UIColor.systemPinkColor;
52-
}
53-
NSDictionary<NSString*, NSString*>* launchArgsMap = @{
54-
// The golden test args should match `GoldenTestManager`.
55-
@"--locale-initialization" : @"locale_initialization",
56-
@"--platform-view" : @"platform_view",
57-
@"--platform-view-no-overlay-intersection" : @"platform_view_no_overlay_intersection",
58-
@"--platform-view-two-intersecting-overlays" : @"platform_view_two_intersecting_overlays",
59-
@"--platform-view-partial-intersection" : @"platform_view_partial_intersection",
60-
@"--platform-view-one-overlay-two-intersecting-overlays" :
61-
@"platform_view_one_overlay_two_intersecting_overlays",
62-
@"--platform-view-multiple-without-overlays" : @"platform_view_multiple_without_overlays",
63-
@"--platform-view-max-overlays" : @"platform_view_max_overlays",
64-
@"--platform-view-surrounding-layers-fractional-coordinate" :
65-
@"platform_view_surrounding_layers_fractional_coordinate",
66-
@"--platform-view-partial-intersection-fractional-coordinate" :
67-
@"platform_view_partial_intersection_fractional_coordinate",
68-
@"--platform-view-multiple" : @"platform_view_multiple",
69-
@"--platform-view-multiple-background-foreground" :
70-
@"platform_view_multiple_background_foreground",
71-
@"--platform-view-cliprect" : @"platform_view_cliprect",
72-
@"--platform-view-cliprect-multiple-clips" : @"platform_view_cliprect_multiple_clips",
73-
@"--platform-view-cliprrect" : @"platform_view_cliprrect",
74-
@"--platform-view-cliprrect-multiple-clips" : @"platform_view_cliprrect_multiple_clips",
75-
@"--platform-view-large-cliprrect" : @"platform_view_large_cliprrect",
76-
@"--platform-view-large-cliprrect-multiple-clips" :
77-
@"platform_view_large_cliprrect_multiple_clips",
78-
@"--platform-view-clippath" : @"platform_view_clippath",
79-
@"--platform-view-clippath-multiple-clips" : @"platform_view_clippath_multiple_clips",
80-
@"--platform-view-cliprrect-with-transform" : @"platform_view_cliprrect_with_transform",
81-
@"--platform-view-cliprrect-with-transform-multiple-clips" :
82-
@"platform_view_cliprrect_with_transform_multiple_clips",
83-
@"--platform-view-large-cliprrect-with-transform" :
84-
@"platform_view_large_cliprrect_with_transform",
85-
@"--platform-view-large-cliprrect-with-transform-multiple-clips" :
86-
@"platform_view_large_cliprrect_with_transform_multiple_clips",
87-
@"--platform-view-cliprect-with-transform" : @"platform_view_cliprect_with_transform",
88-
@"--platform-view-cliprect-with-transform-multiple-clips" :
89-
@"platform_view_cliprect_with_transform_multiple_clips",
90-
@"--platform-view-clippath-with-transform" : @"platform_view_clippath_with_transform",
91-
@"--platform-view-clippath-with-transform-multiple-clips" :
92-
@"platform_view_clippath_with_transform_multiple_clips",
93-
@"--platform-view-transform" : @"platform_view_transform",
94-
@"--platform-view-opacity" : @"platform_view_opacity",
95-
@"--platform-view-with-other-backdrop-filter" : @"platform_view_with_other_backdrop_filter",
96-
@"--two-platform-views-with-other-backdrop-filter" :
97-
@"two_platform_views_with_other_backdrop_filter",
98-
@"--platform-view-with-negative-backdrop-filter" :
99-
@"platform_view_with_negative_backdrop_filter",
100-
@"--platform-view-rotate" : @"platform_view_rotate",
101-
@"--non-full-screen-flutter-view-platform-view" : @"non_full_screen_flutter_view_platform_view",
102-
@"--gesture-reject-after-touches-ended" : @"platform_view_gesture_reject_after_touches_ended",
103-
@"--gesture-reject-eager" : @"platform_view_gesture_reject_eager",
104-
@"--gesture-accept" : @"platform_view_gesture_accept",
105-
@"--gesture-accept-with-overlapping-platform-views" :
106-
@"platform_view_gesture_accept_with_overlapping_platform_views",
107-
@"--tap-status-bar" : @"tap_status_bar",
108-
@"--animated-color-square" : @"animated_color_square",
109-
@"--solid-blue" : @"solid_blue",
110-
@"--platform-view-with-continuous-texture" : @"platform_view_with_continuous_texture",
111-
@"--bogus-font-text" : @"bogus_font_text",
112-
@"--spawn-engine-works" : @"spawn_engine_works",
113-
@"--pointer-events" : @"pointer_events",
114-
@"--platform-view-scrolling-under-widget" : @"platform_view_scrolling_under_widget",
115-
@"--platform-views-with-clips-scrolling" : @"platform_views_with_clips_scrolling",
116-
@"--platform-views-with-clips-scrolling-multiple-clips" :
117-
@"platform_views_with_clips_scrolling_multiple_clips",
118-
@"--platform-view-cliprect-after-moved" : @"platform_view_cliprect_after_moved",
119-
@"--platform-view-cliprect-after-moved-multiple-clips" :
120-
@"platform_view_cliprect_after_moved_multiple_clips",
121-
@"--two-platform-view-clip-rect" : @"two_platform_view_clip_rect",
122-
@"--two-platform-view-clip-rect-multiple-clips" : @"two_platform_view_clip_rect_multiple_clips",
123-
@"--two-platform-view-clip-rrect" : @"two_platform_view_clip_rrect",
124-
@"--two-platform-view-clip-rrect-multiple-clips" :
125-
@"two_platform_view_clip_rrect_multiple_clips",
126-
@"--two-platform-view-clip-path" : @"two_platform_view_clip_path",
127-
@"--two-platform-view-clip-path-multiple-clips" : @"two_platform_view_clip_path_multiple_clips",
128-
@"--darwin-system-font" : @"darwin_system_font",
129-
};
130-
__block NSString* flutterViewControllerTestName = nil;
131-
[launchArgsMap
132-
enumerateKeysAndObjectsUsingBlock:^(NSString* argument, NSString* testName, BOOL* stop) {
133-
if ([processArguments containsObject:argument]) {
134-
flutterViewControllerTestName = testName;
135-
*stop = YES;
136-
}
137-
}];
138-
if (flutterViewControllerTestName) {
139-
[self setupFlutterViewControllerTest:flutterViewControllerTestName];
140-
} else if ([processArguments containsObject:@"--screen-before-flutter"]) {
141-
self.window.rootViewController = [[ScreenBeforeFlutter alloc] initWithEngineRunCompletion:nil];
142-
} else {
143-
self.window.rootViewController = [[UIViewController alloc] init];
144-
}
145-
146-
[self.window makeKeyAndVisible];
18+
// The window and its root view controller are set up by SceneDelegate.
14719
if ([processArguments containsObject:@"--with-continuous-texture"]) {
14820
[ContinuousTexture
14921
registerWithRegistrar:[self registrarForPlugin:@"com.constant.firing.texture"]];
15022
}
15123
return [super application:application didFinishLaunchingWithOptions:launchOptions];
15224
}
15325

154-
- (FlutterEngine*)engineForTest:(NSString*)scenarioIdentifier {
155-
if ([scenarioIdentifier isEqualToString:@"spawn_engine_works"]) {
156-
FlutterEngine* spawner = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest"
157-
project:nil];
158-
[spawner run];
159-
return [spawner spawnWithEntrypoint:nil libraryURI:nil initialRoute:nil entrypointArgs:nil];
160-
} else {
161-
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest"
162-
project:nil];
163-
[engine run];
164-
return engine;
165-
}
166-
}
167-
168-
- (FlutterViewController*)flutterViewControllerForTest:(NSString*)scenarioIdentifier
169-
withEngine:(FlutterEngine*)engine {
170-
if ([scenarioIdentifier isEqualToString:@"tap_status_bar"]) {
171-
return [[FlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil];
172-
} else {
173-
return [[NoStatusBarFlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil];
174-
}
175-
}
176-
177-
- (void)setupFlutterViewControllerTest:(NSString*)scenarioIdentifier {
178-
FlutterEngine* engine = [self engineForTest:scenarioIdentifier];
179-
FlutterViewController* flutterViewController =
180-
[self flutterViewControllerForTest:scenarioIdentifier withEngine:engine];
181-
flutterViewController.view.accessibilityIdentifier = @"flutter_view";
182-
183-
[engine.binaryMessenger
184-
setMessageHandlerOnChannel:@"waiting_for_status"
185-
binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) {
186-
FlutterMethodChannel* channel = [FlutterMethodChannel
187-
methodChannelWithName:@"driver"
188-
binaryMessenger:engine.binaryMessenger
189-
codec:[FlutterJSONMethodCodec sharedInstance]];
190-
[channel invokeMethod:@"set_scenario" arguments:@{@"name" : scenarioIdentifier}];
191-
}];
192-
// Can be used to synchronize timing in the test for a signal from Dart.
193-
[engine.binaryMessenger
194-
setMessageHandlerOnChannel:@"display_data"
195-
binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) {
196-
NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:message
197-
options:0
198-
error:nil];
199-
UITextField* text = [[UITextField alloc] initWithFrame:CGRectMake(0, 400, 300, 100)];
200-
text.text = dict[@"data"];
201-
[flutterViewController.view addSubview:text];
202-
}];
203-
204-
TextPlatformViewFactory* textPlatformViewFactory =
205-
[[TextPlatformViewFactory alloc] initWithMessenger:engine.binaryMessenger];
206-
NSObject<FlutterPluginRegistrar>* registrar =
207-
[engine registrarForPlugin:@"scenarios/TextPlatformViewPlugin"];
208-
[registrar registerViewFactory:textPlatformViewFactory
209-
withId:@"scenarios/textPlatformView"
210-
gestureRecognizersBlockingPolicy:FlutterPlatformViewGestureRecognizersBlockingPolicyEager];
211-
[registrar registerViewFactory:textPlatformViewFactory
212-
withId:@"scenarios/textPlatformView_blockPolicyUntilTouchesEnded"
213-
gestureRecognizersBlockingPolicy:
214-
FlutterPlatformViewGestureRecognizersBlockingPolicyWaitUntilTouchesEnded];
215-
216-
UIViewController* rootViewController = flutterViewController;
217-
if ([scenarioIdentifier isEqualToString:@"non_full_screen_flutter_view_platform_view"]) {
218-
// Make Flutter View's origin x/y not 0.
219-
rootViewController = [[NoStatusBarViewController alloc] init];
220-
[rootViewController.view addSubview:flutterViewController.view];
221-
flutterViewController.view.frame = CGRectMake(150, 150, 500, 500);
222-
} else if ([scenarioIdentifier isEqualToString:@"tap_status_bar"]) {
223-
[engine.binaryMessenger
224-
setMessageHandlerOnChannel:@"flutter/status_bar"
225-
binaryMessageHandler:^(NSData* _Nullable message, FlutterBinaryReply _Nonnull reply) {
226-
NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:message
227-
options:0
228-
error:nil];
229-
FlutterBasicMessageChannel* channel = [[FlutterBasicMessageChannel alloc]
230-
initWithName:@"display_data"
231-
binaryMessenger:engine.binaryMessenger
232-
codec:[FlutterJSONMessageCodec sharedInstance]];
233-
[channel sendMessage:@{@"data" : dict}];
234-
UITextField* text =
235-
[[UITextField alloc] initWithFrame:CGRectMake(0, 400, 300, 100)];
236-
text.text = dict[@"method"];
237-
[flutterViewController.view addSubview:text];
238-
}];
239-
}
240-
241-
self.window.rootViewController = rootViewController;
242-
}
243-
24426
@end

‎engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/Scenarios/Info.plist‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23+
<key>UIApplicationSceneManifest</key>
24+
<dict>
25+
<key>UIApplicationSupportsMultipleScenes</key>
26+
<false/>
27+
<key>UISceneConfigurations</key>
28+
<dict>
29+
<key>UIWindowSceneSessionRoleApplication</key>
30+
<array>
31+
<dict>
32+
<key>UISceneClassName</key>
33+
<string>UIWindowScene</string>
34+
<key>UISceneConfigurationName</key>
35+
<string>Default Configuration</string>
36+
<key>UISceneDelegateClassName</key>
37+
<string>SceneDelegate</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</dict>
2342
<key>UILaunchStoryboardName</key>
2443
<string>LaunchScreen</string>
2544
<key>UIRequiredDeviceCapabilities</key>

‎engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/Scenarios/Info_Skia.plist‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23+
<key>UIApplicationSceneManifest</key>
24+
<dict>
25+
<key>UIApplicationSupportsMultipleScenes</key>
26+
<false/>
27+
<key>UISceneConfigurations</key>
28+
<dict>
29+
<key>UIWindowSceneSessionRoleApplication</key>
30+
<array>
31+
<dict>
32+
<key>UISceneClassName</key>
33+
<string>UIWindowScene</string>
34+
<key>UISceneConfigurationName</key>
35+
<string>Default Configuration</string>
36+
<key>UISceneDelegateClassName</key>
37+
<string>SceneDelegate</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</dict>
2342
<key>UILaunchStoryboardName</key>
2443
<string>LaunchScreen</string>
2544
<key>UIRequiredDeviceCapabilities</key>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#ifndef FLUTTER_TESTING_IOS_SCENARIO_APP_IOS_SCENARIOS_SCENARIOS_SCENEDELEGATE_H_
6+
#define FLUTTER_TESTING_IOS_SCENARIO_APP_IOS_SCENARIOS_SCENARIOS_SCENEDELEGATE_H_
7+
8+
#import <Flutter/Flutter.h>
9+
#import <UIKit/UIKit.h>
10+
11+
@interface SceneDelegate : FlutterSceneDelegate
12+
13+
/**
14+
* The main window of the first connected scene, or nil if no scene is connected.
15+
*
16+
* Under the UIScene life cycle a window belongs to a scene rather than to the application
17+
* delegate, and a single scene delegate may serve more than one scene. The scenario app only
18+
* ever has one scene, so tests use this to reach its root view controller.
19+
*/
20+
@property(class, nonatomic, readonly, nullable) UIWindow* mainWindowOfFirstConnectedScene;
21+
22+
@end
23+
24+
#endif // FLUTTER_TESTING_IOS_SCENARIO_APP_IOS_SCENARIOS_SCENARIOS_SCENEDELEGATE_H_

0 commit comments

Comments
 (0)