Skip to content

Commit

Permalink
Fix cli bundle platform for Mac Catalyst in react-native-xcode.sh (f…
Browse files Browse the repository at this point in the history
…acebook#31062)

Summary:
A recent commit facebook@941bc0e#diff-0eeea47fa4bace26fa6c492a03fa0ea3923a2d8d54b7894f7760cb9131ab65eb on Hermes macOS brings a regression for Mac Catalyst target.

Once hardcoded cli bundle platform `ios` can now be either `ios` or `macos`. However, Mac Catalyst is identified as `macos` rather than `ios`.

This PR should fix it and close facebook#31061.

## Changelog

[iOS] [Fixed] - Fix cli bundle platform for Mac Catalyst in `react-native-xcode.sh`

Pull Request resolved: facebook#31062

Test Plan:
1. Build fails on a new RN 0.64-rc.3 project.
2. Apply the fix.
3. Build passes.

Reviewed By: TheSavior

Differential Revision: D29038793

Pulled By: appden

fbshipit-source-id: 29761f887ec7a9cc26f088953c3888c6d19bed71
  • Loading branch information
robertying authored and danilobuerger committed Oct 28, 2021
1 parent bf799df commit 4b84c20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ case "$PLATFORM_NAME" in
;;
esac

if [ "${IS_MACCATALYST}" = "YES" ]; then
BUNDLE_PLATFORM="ios"
fi

EMIT_SOURCEMAP=
if [[ ! -z "$SOURCEMAP_FILE" ]]; then
EMIT_SOURCEMAP=true
Expand Down

0 comments on commit 4b84c20

Please sign in to comment.