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 --device option to build-ios command #2482

Merged
merged 1 commit into from
Aug 23, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export type BuildFlags = {

export const getBuildOptions = ({platformName}: BuilderCommand) => {
const {readableName} = getPlatformInfo(platformName);
const isMac = platformName === 'macos';

return [
{
name: '--mode <string>',
Expand Down Expand Up @@ -60,5 +62,11 @@ export const getBuildOptions = ({platformName}: BuilderCommand) => {
name: '--force-pods',
description: 'Force CocoaPods installation',
},
!isMac && {
name: '--device [string]', // here we're intentionally using [] over <> to make passed value optional to allow users to run only on physical devices
description:
'Explicitly set the device to use by name or by unique device identifier . If the value is not provided,' +
'the app will run on the first available physical device.',
},
];
};
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ export const getRunOptions = ({platformName}: BuilderCommand) => {
'between parentheses at the end to match an exact version: ' +
'"iPhone 15 (17.0)"',
},
!isMac && {
name: '--device [string]', // here we're intentionally using [] over <> to make passed value optional to allow users to run only on physical devices
description:
'Explicitly set the device to use by name or by unique device identifier . If the value is not provided,' +
'the app will run on the first available physical device.',
},
...getBuildOptions({platformName}),
];
};
4 changes: 4 additions & 0 deletions packages/cli-platform-ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ Explicitly set Xcode scheme to use.

Explicitly set Xcode target to use.

#### `--device [string]`

Explicitly set device to use by name. The value is not required if you have a single device connected.

#### `--verbose`

Do not use `xcbeautify` or `xcpretty` even if installed.
Expand Down
Loading