Skip to content

Commit

Permalink
fix(react-native-xcode): Add back BUNDLE_COMMAND (#46495)
Browse files Browse the repository at this point in the history
Summary:
In this PR #45560  the BUNDLE_COMMAND initialization was removed while it is still being used. Without it, building from Xcode throws unknown options error for Physical iOS devices.

I have just brought back the initialization from the PR before that, so the bundle phase is successful.

## Changelog:
[IOS][Fixed] - Add back the BUNDLE_COMMAND

Pull Request resolved: #46495

Test Plan: I have bundled release builds in Xcode. Everything seems to be fine.

Reviewed By: cortinico

Differential Revision: D62846877

Pulled By: cipolleschi

fbshipit-source-id: 3f07e8c0bc5acf98177582f1fee9a55ae77b31a1
  • Loading branch information
Vin-Xi authored and blakef committed Sep 30, 2024
1 parent 0265ea0 commit afd74ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-native/scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ fi

[ -z "$CLI_PATH" ] && CLI_PATH="$REACT_NATIVE_DIR/scripts/bundle.js"

[ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"

[ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js"

if [[ -z "$BUNDLE_CONFIG" ]]; then
Expand Down

4 comments on commit afd74ad

@kodeandoec
Copy link

Choose a reason for hiding this comment

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

i have add this code manually but no works, still have a issue
Command PhaseScriptExecution failed with a nonzero exit code
When i try to run on physica device no works, but when i run on simulator works fine
When i try to ARCHIVE project to publish to store i have the same error

@fabioruxo
Copy link

Choose a reason for hiding this comment

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

Exactly the same for me as well. react-native 0.75.3 XCode 16.0

@kodeandoec
Copy link

Choose a reason for hiding this comment

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

I will unintall al xcode, commandline, and reinstall all, and works fine @fabioruxo

@fabioruxo
Copy link

Choose a reason for hiding this comment

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

@kodeandoec Worked!! Thank you so much

Please sign in to comment.