From 76ce8987056e21b43ca0b58d201a2b82969282b0 Mon Sep 17 00:00:00 2001 From: Michael Bahl Date: Tue, 16 May 2023 14:47:36 +0200 Subject: [PATCH] fix: add missing argument to xcodebuild shell (destination) (#1934) - destination is used for to specify the arch for iOS build - this is needed for modules which require arch x84_64 --- packages/cli-platform-ios/README.md | 4 ++++ .../cli-platform-ios/src/commands/buildIOS/buildProject.ts | 6 ++++-- packages/cli-platform-ios/src/commands/buildIOS/index.ts | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/cli-platform-ios/README.md b/packages/cli-platform-ios/README.md index 445a47b4c..1629cbeab 100644 --- a/packages/cli-platform-ios/README.md +++ b/packages/cli-platform-ios/README.md @@ -65,6 +65,10 @@ Explicitly set Xcode scheme to use. Explicitly set device to use by name. The value is not required if you have a single device connected. +#### `--destination ` + +Explicitly extend distination e.g. "arch=x86_64" + #### `--udid ` Explicitly set device to use by udid. diff --git a/packages/cli-platform-ios/src/commands/buildIOS/buildProject.ts b/packages/cli-platform-ios/src/commands/buildIOS/buildProject.ts index d38ed7aea..172a5088b 100644 --- a/packages/cli-platform-ios/src/commands/buildIOS/buildProject.ts +++ b/packages/cli-platform-ios/src/commands/buildIOS/buildProject.ts @@ -20,6 +20,7 @@ export type BuildFlags = { port: number; terminal: string | undefined; interactive?: boolean; + destination?: string; extraParams?: string[]; }; @@ -40,11 +41,12 @@ export function buildProject( '-scheme', scheme, '-destination', - udid + (udid ? `id=${udid}` : args.mode === 'Debug' ? 'generic/platform=iOS Simulator' - : 'generic/platform=iOS', + : 'generic/platform=iOS') + + (args.destination ? ',' + args.destination : ''), ]; if (args.extraParams) { diff --git a/packages/cli-platform-ios/src/commands/buildIOS/index.ts b/packages/cli-platform-ios/src/commands/buildIOS/index.ts index 8b400d99c..81e0ba46f 100644 --- a/packages/cli-platform-ios/src/commands/buildIOS/index.ts +++ b/packages/cli-platform-ios/src/commands/buildIOS/index.ts @@ -228,6 +228,10 @@ export const iosBuildOptions = [ description: 'Explicitly set device to use by name. The value is not required if you have a single device connected.', }, + { + name: '--destination ', + description: 'Explicitly extend distination e.g. "arch=x86_64"', + }, { name: '--udid ', description: 'Explicitly set device to use by udid',