.
diff --git a/dev/devicelab/bin/tasks/module_test_ios.dart b/dev/devicelab/bin/tasks/module_test_ios.dart index 192d722..85a4ffb 100644 --- a/dev/devicelab/bin/tasks/module_test_ios.dart +++ b/dev/devicelab/bin/tasks/module_test_ios.dart
@@ -54,6 +54,9 @@ final File marquee = File(path.join(flutterModuleLibSource.path, 'marquee')); marquee.copySync(path.join(flutterModuleLibDestination.path, 'marquee.dart')); + final File resize = File(path.join(flutterModuleLibSource.path, 'resize')); + resize.copySync(path.join(flutterModuleLibDestination.path, 'resize.dart')); + section('Create package with native assets'); const String ffiPackageName = 'ffi_package'; @@ -660,7 +663,7 @@ return TaskResult.failure(e.toString()); } finally { unawaited(removeIOSSimulator(simulatorDeviceId)); - rmTree(tempDir); + // rmTree(tempDir); } }); }
diff --git a/dev/integration_tests/ios_host_app/Host.xcodeproj/project.pbxproj b/dev/integration_tests/ios_host_app/Host.xcodeproj/project.pbxproj index f782c3a..cf8673b 100644 --- a/dev/integration_tests/ios_host_app/Host.xcodeproj/project.pbxproj +++ b/dev/integration_tests/ios_host_app/Host.xcodeproj/project.pbxproj
@@ -13,6 +13,7 @@ 74F97871215AB9E9005A0F04 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74F9786F215AB9E9005A0F04 /* LaunchScreen.storyboard */; }; 74F97874215AB9E9005A0F04 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 74F97873215AB9E9005A0F04 /* main.m */; }; 7E06ECD9FAEFCA4A0ED04D6E /* libPods-FlutterUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 327E8CC22A494E7D7155FB58 /* libPods-FlutterUITests.a */; }; + F2B2437A2E958FD00018950C /* DynamicResizingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2B243792E958FD00018950C /* DynamicResizingViewController.m */; }; F7C2661424AC18D00085742D /* DualFlutterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2660E24AC18D00085742D /* DualFlutterViewController.m */; }; F7C2661524AC18D00085742D /* FullScreenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2660F24AC18D00085742D /* FullScreenViewController.m */; }; F7C2661624AC18D00085742D /* HybridViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2661124AC18D00085742D /* HybridViewController.m */; }; @@ -45,6 +46,8 @@ 8E6751F293967EE3DFF4178A /* Pods-FlutterUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FlutterUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests.release.xcconfig"; sourceTree = "<group>"; }; 91B7D4263BFD246A27391225 /* Pods-Host.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Host.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Host/Pods-Host.debug.xcconfig"; sourceTree = "<group>"; }; E20960BD8B505D605FE82853 /* libPods-Host.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Host.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F2B243782E958FD00018950C /* DynamicResizingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DynamicResizingViewController.h; sourceTree = "<group>"; }; + F2B243792E958FD00018950C /* DynamicResizingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DynamicResizingViewController.m; sourceTree = "<group>"; }; F7C2660E24AC18D00085742D /* DualFlutterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DualFlutterViewController.m; sourceTree = "<group>"; }; F7C2660F24AC18D00085742D /* FullScreenViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FullScreenViewController.m; sourceTree = "<group>"; }; F7C2661024AC18D00085742D /* HybridViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HybridViewController.h; sourceTree = "<group>"; }; @@ -111,6 +114,8 @@ F7C2660E24AC18D00085742D /* DualFlutterViewController.m */, F7C2661224AC18D00085742D /* FullScreenViewController.h */, F7C2660F24AC18D00085742D /* FullScreenViewController.m */, + F2B243782E958FD00018950C /* DynamicResizingViewController.h */, + F2B243792E958FD00018950C /* DynamicResizingViewController.m */, F7C2661024AC18D00085742D /* HybridViewController.h */, F7C2661124AC18D00085742D /* HybridViewController.m */, 74F97864215AB9E8005A0F04 /* AppDelegate.h */, @@ -284,10 +289,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests-frameworks.sh\"\n"; @@ -305,6 +314,8 @@ "${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh", ); name = "[CP-User] Run Flutter Build hello Script"; + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build"; @@ -317,10 +328,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Host/Pods-Host-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Host/Pods-Host-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Host/Pods-Host-frameworks.sh\"\n"; @@ -338,6 +353,8 @@ "${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh", ); name = "[CP-User] Run Flutter Build hello Script"; + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build"; @@ -374,6 +391,7 @@ F7C2661524AC18D00085742D /* FullScreenViewController.m in Sources */, F7C2661424AC18D00085742D /* DualFlutterViewController.m in Sources */, F7C2661C24AC18DD0085742D /* MainViewController.m in Sources */, + F2B2437A2E958FD00018950C /* DynamicResizingViewController.m in Sources */, 74F97874215AB9E9005A0F04 /* main.m in Sources */, F7C2661624AC18D00085742D /* HybridViewController.m in Sources */, F7C2661B24AC18DD0085742D /* NativeViewController.m in Sources */,
diff --git a/dev/integration_tests/ios_host_app/Host/DynamicResizingViewController.m b/dev/integration_tests/ios_host_app/Host/DynamicResizingViewController.m index 9b0e364..73c47f6 100644 --- a/dev/integration_tests/ios_host_app/Host/DynamicResizingViewController.m +++ b/dev/integration_tests/ios_host_app/Host/DynamicResizingViewController.m
@@ -41,13 +41,12 @@ for (int index = 1; index <= 50; index++) { if (index == 10) { _flutterViewController = [[FlutterViewController alloc] init]; - _flutterViewController.isAutoResizable = true; + _flutterViewController.autoResizable = true; [self addChildViewController:_flutterViewController]; [stackView addArrangedSubview:_flutterViewController.view]; [_flutterViewController didMoveToParentViewController:self]; } else { UILabel *label = [[UILabel alloc] init]; - // Swift: label.text = "Hello from iOS \(index)" label.text = [NSString stringWithFormat:@"Hello from iOS %d", index]; [stackView addArrangedSubview:label]; }
diff --git a/dev/integration_tests/ios_host_app/Host/MainViewController.m b/dev/integration_tests/ios_host_app/Host/MainViewController.m index f2c1c66..c487c73 100644 --- a/dev/integration_tests/ios_host_app/Host/MainViewController.m +++ b/dev/integration_tests/ios_host_app/Host/MainViewController.m
@@ -9,6 +9,7 @@ #import "FullScreenViewController.h" #import "HybridViewController.h" #import "NativeViewController.h" +#import "DynamicResizingViewController.h" @interface MainViewController () @@ -44,6 +45,7 @@ self.flutterViewWarmButton = [self addButton:@"Flutter View (Warm)" action:@selector(showFlutterViewWarm)]; [self addButton:@"Hybrid View (Warm)" action:@selector(showHybridView)]; [self addButton:@"Dual Flutter View (Cold)" action:@selector(showDualView)]; + [self addButton:@"Dynamic Content Resizing" action:@selector(showContentResizingView)]; } - (FlutterEngine *)engine { @@ -54,6 +56,13 @@ return [(AppDelegate *)[[UIApplication sharedApplication] delegate] reloadMessageChannel]; } +- (void)showContentResizingView { + DynamicResizingViewController *resizingViewController = + [[DynamicResizingViewController alloc] init]; + [self.navigationController pushViewController:resizingViewController + animated:YES]; +} + - (void)showDualView { DualFlutterViewController *dualViewController = [[DualFlutterViewController alloc] init];
diff --git a/dev/integration_tests/ios_host_app/flutterapp/lib/main b/dev/integration_tests/ios_host_app/flutterapp/lib/main index 87557d4..c5cff62 100644 --- a/dev/integration_tests/ios_host_app/flutterapp/lib/main +++ b/dev/integration_tests/ios_host_app/flutterapp/lib/main
@@ -10,6 +10,7 @@ import 'package:ffi_package/ffi_package.dart'; import 'marquee.dart'; +import 'resize.dart'; /// Route names. (See [main] for more details.) /// @@ -18,6 +19,7 @@ const String purpleMarqueeRouteName = 'marquee_purple'; const String fullscreenRouteName = 'full'; const String hybridRouteName = 'hybrid'; +const String resizeRouteName = 'resize'; /// Channel used to let the Flutter app know to reset the app to a specific /// route. See the [run] method. @@ -55,6 +57,9 @@ case purpleMarqueeRouteName: runApp(Marquee(color: Colors.purple[400])); break; + case resizeRouteName: + runApp(ResizeApp()); + break; case fullscreenRouteName: case hybridRouteName: default: