Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing argument to xcodebuild shell (destination) #1934

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"',
},
Comment on lines +231 to +234
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this flag to the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to docs

Copy link

@domthomhive domthomhive Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version of react-native and the cli is this option available from? Doesn't seem to work in 0.70.14 with cli version 9.2.1. Thanks

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @domthomhive, it's available since 0.72 (CLI version: 11.x).

{
name: '--udid <string>',
description: 'Explicitly set device to use by udid',
Expand Down