From cd09d9d3146f92ce2584408ea4d5702b2e835eef Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 16 Feb 2023 12:10:57 -0800 Subject: [PATCH] [ci] Update iOS simulator (#7131) Updates the iOS simulator used in CI from an iPhone 11 to an iPhone 13. Part of alignment with flutter/packages in preparation for merging repositories. Updates a Maps integration test for issues with the newer device. --- .ci/scripts/create_simulator.sh | 2 +- .ci/targets/ios_platform_tests.yaml | 2 +- .../example/lib/map_coordinates.dart | 36 ++++++++++--------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.ci/scripts/create_simulator.sh b/.ci/scripts/create_simulator.sh index 3d86739051f1..98bfb6573593 100644 --- a/.ci/scripts/create_simulator.sh +++ b/.ci/scripts/create_simulator.sh @@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -device=com.apple.CoreSimulator.SimDeviceType.iPhone-11 +device=com.apple.CoreSimulator.SimDeviceType.iPhone-13 os=com.apple.CoreSimulator.SimRuntime.iOS-16-0 xcrun simctl list diff --git a/.ci/targets/ios_platform_tests.yaml b/.ci/targets/ios_platform_tests.yaml index 5a00da7278a4..692b83dcb285 100644 --- a/.ci/targets/ios_platform_tests.yaml +++ b/.ci/targets/ios_platform_tests.yaml @@ -15,7 +15,7 @@ tasks: args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"] - name: native test script: script/tool_runner.sh - args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 11,OS=latest"] + args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 13,OS=latest"] - name: drive examples # `drive-examples` contains integration tests, which changes the UI of the application. # This UI change sometimes affects `xctest`. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/map_coordinates.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/map_coordinates.dart index 22f383bd1254..25247bc7c7bd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/map_coordinates.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/map_coordinates.dart @@ -53,17 +53,28 @@ class _MapCoordinatesBodyState extends State<_MapCoordinatesBody> { _updateVisibleRegion(); return true; }, - child: ListView( + child: Stack( children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Center( - child: SizedBox( - width: 300.0, - height: 200.0, - child: googleMap, + ListView( + children: [ + Padding( + padding: const EdgeInsets.all(10.0), + child: Center( + child: SizedBox( + width: 300.0, + height: 200.0, + child: googleMap, + ), + ), ), - ), + // Add a block at the bottom of this list to allow validation that the visible region of the map + // does not change when scrolled under the safe view on iOS. + // https://github.com/flutter/flutter/issues/107913 + const SizedBox( + width: 300, + height: 1000, + ), + ], ), if (mapController != null) Center( @@ -71,13 +82,6 @@ class _MapCoordinatesBodyState extends State<_MapCoordinatesBody> { '\nnortheast: ${_visibleRegion.northeast},' '\nsouthwest: ${_visibleRegion.southwest}'), ), - // Add a block at the bottom of this list to allow validation that the visible region of the map - // does not change when scrolled under the safe view on iOS. - // https://github.com/flutter/flutter/issues/107913 - const SizedBox( - width: 300, - height: 1000, - ), ], ), );