From f1d522d5038797ad521bd75ca324bfe26ca5444e Mon Sep 17 00:00:00 2001 From: tauu Date: Thu, 16 Apr 2020 19:58:45 +0200 Subject: [PATCH] fixed flutter run for projects containing a watchOS companion (#54959) Co-authored-by: Georg Wechslberger --- packages/flutter_tools/lib/src/ios/mac.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 5531a5ebc62..76e7361d855 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -256,7 +256,11 @@ Future buildXcodeProject({ final String activeArchName = getNameForDarwinArch(activeArch); if (activeArchName != null) { buildCommands.add('ONLY_ACTIVE_ARCH=YES'); - buildCommands.add('ARCHS=$activeArchName'); + // Setting ARCHS to $activeArchName will break the build if a watchOS companion app exists, + // as it cannot be build for the architecture of the flutter app. + if (!hasWatchCompanion) { + buildCommands.add('ARCHS=$activeArchName'); + } } }