-
Notifications
You must be signed in to change notification settings - Fork 919
Couldn't find "PLATFORM_NAME" variable in Xcodebuild output when providing binaryPath #2517
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
Comments
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
@emilundg I'm running into this as well during my RN 0.79.2 upgrade. Did you find a solution? |
Currently, I had to downgrade the CLI packages to 12.3.7 in order for it to work properly with pre-built binaries on iOS :( |
@cipolleschi or @mikehardy would you be able to reopen this issue as it still exists? The short version of the issue is that when you run |
@szymonrybczak @thymikee can you check whether this is still valid and reopen it if needed? |
@thymikee thanks for reopening. I can add that this can be reproduced in a vanilla RN project with:
And then running
This gives the following output:
|
@szymonrybczak or @thymikee any news on this? |
For now, I've created this patch to fix various issues with the CLI (primarily issues with prebuilt binaries): Patch part 1: Patch part 2: Patch part 3: Patch part 4:
The patch seems to work for new builds, builds with prebuilt binaries and both on simulators and physical devices. |
Environment
Description
When providing the option --binary-path to run-ios the following error happens and fails the install:
Couldn't find "PLATFORM_NAME variable in Xcodebuild output
After doing some digging in the code for cli-platform-apple we see that in the file getBuildSettings.ts the function getPlatformName is called with buildOutput. The problem is that in the file runOnSimulator.ts (that calls getBuildSettings) the buildOutput variable is set as an empty string when providing a binaryPath.
Reproducible Demo
Haven't tried in a fresh React Native project but it should be present there as well. So create a React Native project with an iOS artifact already built and then run:
yarn react-native run-ios --binary-path= ./ios/build/Build/Products/Debug-iphonesimulator/MyApp.app
The text was updated successfully, but these errors were encountered: