Skip to content

Conversation

@theproducer
Copy link
Contributor

@theproducer theproducer commented Oct 28, 2025

This PR adds a --target-name flag to cap run ios|android to select a run target by name instead of its ID.

example:

npx cap run ios --target-name "iPhone 17 Pro"

Its up to the developer to make sure their emulators / simulators have unique names.

To target emulators / simulators with similar names but different OS versions:

npx cap run ios --target-name "iPhone 16 Pro" --target-name-sdk-version "18.0"

closes: #8111

.addOption(new Option('--json').hideHelp())
.option('--target <id>', 'use a specific target')
.option('--target-name <name>', 'use a specific target by name')
.option('--target-name-sdk-version <version>', 'use a specific sdk version when using --target-name')

Choose a reason for hiding this comment

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

Wonder if it's relevant providing examples of the SDK version format to use (assume it's the SDK int for Android and regular iOS version for iOS, but maybe worth making explicit)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: cap run --target-name for team usage

4 participants