Skip to content

Commit

Permalink
fix: add missing argument to xcodebuild shell (destination)
Browse files Browse the repository at this point in the history
- destination is used for to specify the arch for iOS build
- this is needed for modules which require arch x84_64
  • Loading branch information
MichelBahl committed May 16, 2023
1 parent e50feb4 commit ed5e9cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/cli-platform-ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string>`

Explicitly extend distination e.g. "arch=x86_64"

#### `--udid <string>`

Explicitly set device to use by udid.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type BuildFlags = {
port: number;
terminal: string | undefined;
interactive?: boolean;
destination?: string;
extraParams?: string[];
};

Expand All @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions packages/cli-platform-ios/src/commands/buildIOS/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string>',
description: 'Explicitly extend distination e.g. "arch=x86_64"',
},
{
name: '--udid <string>',
description: 'Explicitly set device to use by udid',
Expand Down

0 comments on commit ed5e9cf

Please sign in to comment.