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

getTargetPaths of run-ios ignores build scheme when mode and scheme are specified #1922

Closed
ste7en opened this issue Apr 27, 2023 · 1 comment · Fixed by #1928
Closed

getTargetPaths of run-ios ignores build scheme when mode and scheme are specified #1922

ste7en opened this issue Apr 27, 2023 · 1 comment · Fixed by #1928
Assignees

Comments

@ste7en
Copy link

ste7en commented Apr 27, 2023

Environment

info Fetching system and libraries information...
System:
OS: macOS 13.3.1
CPU: (8) arm64 Apple M2
Memory: 40.22 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.13.0 - /private/var/folders/3z/6l6c_26j61n0_6qwztd6r1bc0000gq/T/xfs-1d283baf/node
Yarn: 3.4.1 - /private/var/folders/3z/6l6c_26j61n0_6qwztd6r1bc0000gq/T/xfs-1d283baf/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
Watchman: 2023.04.24.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/stefano.formicola/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /usr/bin/javac
npmPackages:
@react-native-community/cli: 10.2.1 => 10.2.1
react: 18.2.0 => 18.2.0
react-native: ^0.71.0 => 0.71.7
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Description

The getTargetPaths method searches for the first occurrence of WRAPPER_EXTENSION === 'app' without other properties returned by xcodebuild ... -showBuildSettings -json such as the target name or others.

function getTargetPaths(buildSettings: string) {

This leads to errors when an Xcode project is composed of multiple schemes and run configurations, e.g. 2+ app targets.

Reproducible Demo

Create a React Native iOS project and duplicate the Xcode target and its build scheme. Run and build iOS through CLI with the right flags for both the targets and one of them won't run in favour of the other.

@szymonrybczak
Copy link
Collaborator

Hey @ste7en, I can confirm this issue. I'm going to create --target flag, which I think will be solution for this issue :)

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

Successfully merging a pull request may close this issue.

2 participants