fixed flutter run for projects containing a watchOS companion (#54959)

Co-authored-by: Georg Wechslberger <wechslbe@ma.tum.de>
This commit is contained in:
tauu 2020-04-16 19:58:45 +02:00 committed by GitHub
parent e092dcfa22
commit f1d522d503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,7 +256,11 @@ Future<XcodeBuildResult> 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');
}
}
}