getTargetPaths of run-ios
ignores build scheme when mode and scheme are specified
#1922
Labels
run-ios
ignores build scheme when mode and scheme are specified
#1922
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 ofWRAPPER_EXTENSION === 'app'
without other properties returned byxcodebuild ... -showBuildSettings -json
such as the target name or others.cli/packages/cli-platform-ios/src/commands/runIOS/index.ts
Line 440 in 8a3a02c
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.
The text was updated successfully, but these errors were encountered: