Remove -sdk for watchOS simulator in tool (#152992)

Fix the xcodebuild flags mixing up the iOS and watchOS simulators.

Confirmed this passed in CI on Xcode 16 beta 5: https://github.com/flutter/flutter/pull/152408

Fixes https://github.com/flutter/flutter/issues/152983
See also https://github.com/flutter/flutter/pull/152347
This commit is contained in:
Jenn Magder 2024-08-08 12:34:20 -07:00 committed by GitHub
parent e66ce1591f
commit 6c3677c6e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 4 deletions

View File

@ -211,7 +211,7 @@ class XcodeProjectInterpreter {
...<String>['-configuration', configuration],
if (target != null)
...<String>['-target', target],
if (buildContext.sdk == XcodeSdk.IPhoneSimulator || buildContext.sdk == XcodeSdk.WatchSimulator)
if (buildContext.sdk == XcodeSdk.IPhoneSimulator)
...<String>['-sdk', 'iphonesimulator'],
'-destination',
if (deviceId != null)

View File

@ -190,7 +190,7 @@ abstract class XcodeBasedProject extends FlutterProjectPlatform {
(EnvironmentType.physical, _) when isWatch => XcodeSdk.WatchOS,
(EnvironmentType.simulator, _) when isWatch => XcodeSdk.WatchSimulator,
(EnvironmentType.physical, IosProject _) => XcodeSdk.IPhoneOS,
(EnvironmentType.simulator, IosProject _) => XcodeSdk.WatchSimulator,
(EnvironmentType.simulator, IosProject _) => XcodeSdk.IPhoneSimulator,
(EnvironmentType.physical, MacOSProject _) => XcodeSdk.MacOSX,
(_, _) => throw ArgumentError('Unsupported SDK')
};

View File

@ -448,8 +448,6 @@ void main() {
'xcodebuild',
'-project',
'/',
'-sdk',
'iphonesimulator',
'-destination',
'generic/platform=watchOS Simulator',
'-showBuildSettings',