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

xcodeproj point to fork of react-native-xcode.sh #44721

Closed
wants to merge 1 commit into from

Conversation

blakef
Copy link
Contributor

@blakef blakef commented May 30, 2024

Summary:
The react-native-xcode.sh script in packages/react-native uses template specific cli commands and arguments. The diff forks that code to use the helloworld cli as well as pointing to the monorepo version of react-native instead of node_modules.

This also includes some formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Differential Revision: D57915368

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels May 30, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57915368

@analysis-bot
Copy link

analysis-bot commented May 30, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,675,031 -4
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 23,044,524 -1
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: bb61e07
Branch: main

blakef added a commit to blakef/react-native that referenced this pull request May 30, 2024
Summary:

The react-native-xcode.sh script in packages/react-native uses template specific cli commands and arguments.  The diff forks that code to use the helloworld cli as well as pointing to the monorepo version of react-native instead of node_modules.

This also includes some formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Differential Revision: D57915368
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57915368

blakef added a commit to blakef/react-native that referenced this pull request Jun 4, 2024
…#44721)

Summary:

For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases.  This phase bundles the JS application (dev or production).

I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`.  This is identical except with how the config is captured:

{F1669960016} 

This is similar to our approach with the Gradle plugin, giving Framework authors more control.

**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Differential Revision: D57915368
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57915368

blakef added a commit to blakef/react-native that referenced this pull request Jun 4, 2024
…#44721)

Summary:

For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases.  This phase bundles the JS application (dev or production).

I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`.  This is identical except with how the config is captured:

{F1669960016} 

This is similar to our approach with the Gradle plugin, giving Framework authors more control.

**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Differential Revision: D57915368
…#44721)

Summary:

For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases.  This phase bundles the JS application (dev or production).

I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`.  This is identical except with how the config is captured:

{F1669960016} 

This is similar to our approach with the Gradle plugin, giving Framework authors more control.

**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57915368
blakef added a commit to blakef/react-native that referenced this pull request Jun 5, 2024
…#44721)

Summary:

For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases.  This phase bundles the JS application (dev or production).

I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`.  This is identical except with how the config is captured:

{F1669960016} 

This is similar to our approach with the Gradle plugin, giving Framework authors more control.

**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57915368
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57915368

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57915368

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 5, 2024
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in eba1828.

Copy link

github-actions bot commented Jun 5, 2024

This pull request was successfully merged by @blakef in eba1828.

When will my fix make it into a release? | How to file a pick request?

kosmydel pushed a commit to kosmydel/react-native that referenced this pull request Jun 11, 2024
…#44721)

Summary:
Pull Request resolved: facebook#44721

For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases.  This phase bundles the JS application (dev or production).

I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`.  This is identical except with how the config is captured:

{F1669960016}

This is similar to our approach with the Gradle plugin, giving Framework authors more control.

**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57915368

fbshipit-source-id: f52ea4b3cb94212ac97a3d7edeb68747418fe0a9
facebook-github-bot pushed a commit that referenced this pull request Jul 22, 2024
Summary:
When changing the `react-native-xcode.sh` logic to use the helloworld cli on #44721, the `CLI_PATH` env var was removed along with `BUNDLE_COMMAND`. Both of these values were used by Expo to override the default CLI and use our custom bundling command.

https://github.com/expo/expo/blob/10e302ee13add0e24a08c7ee792c2da50ace95a6/templates/expo-template-bare-minimum/ios/HelloWorld.xcodeproj/project.pbxproj#L215C4-L215C15

This restores the `CLI_PATH` variable and set the default value as `"$REACT_NATIVE_DIR/scripts/bundle.js"`, along with the `BUNDLE_COMMAND` variable. With this Expo and other frameworks can keep the ability to easily replace the internal CLI

## Changelog:

[INTERNAL] [CHANGED] - Restore CLI_PATH variable in react-native-xcode script

Pull Request resolved: #45560

Test Plan: Project compiles correctly on iOS

Reviewed By: robhogan

Differential Revision: D60035338

Pulled By: blakef

fbshipit-source-id: 26583d11d9f573f7cfa405b68e0cc3304c3601df
cipolleschi pushed a commit that referenced this pull request Jul 22, 2024
Summary:
When changing the `react-native-xcode.sh` logic to use the helloworld cli on #44721, the `CLI_PATH` env var was removed along with `BUNDLE_COMMAND`. Both of these values were used by Expo to override the default CLI and use our custom bundling command.

https://github.com/expo/expo/blob/10e302ee13add0e24a08c7ee792c2da50ace95a6/templates/expo-template-bare-minimum/ios/HelloWorld.xcodeproj/project.pbxproj#L215C4-L215C15

This restores the `CLI_PATH` variable and set the default value as `"$REACT_NATIVE_DIR/scripts/bundle.js"`, along with the `BUNDLE_COMMAND` variable. With this Expo and other frameworks can keep the ability to easily replace the internal CLI

## Changelog:

[INTERNAL] [CHANGED] - Restore CLI_PATH variable in react-native-xcode script

Pull Request resolved: #45560

Test Plan: Project compiles correctly on iOS

Reviewed By: robhogan

Differential Revision: D60035338

Pulled By: blakef

fbshipit-source-id: 26583d11d9f573f7cfa405b68e0cc3304c3601df
gabrieldonadel added a commit to expo/expo that referenced this pull request Jul 22, 2024
# Why

On react-native 0.75 the bundling script changed
(facebook/react-native#44721) and now they use
by default a new internal CLI that has an additional parameter called
`--config-cmd`.

In order to prevent us from getting a `Unknown arguments: --config-cmd`
command error we must add a `--config-cmd` option to the `export:embed`
command.

Related to [ENG-12562](https://linear.app/expo/issue/ENG-12562)

# How

Add `--config-cmd` option to `export:embed` and when a value is
supplied, do nothing with it, just to prevent the process from crashing
crash.

# Test Plan

Build on iOS

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
gabrieldonadel added a commit to expo/expo that referenced this pull request Jul 25, 2024
On react-native 0.75 the bundling script changed
(facebook/react-native#44721) and now they use
by default a new internal CLI that has an additional parameter called
`--config-cmd`.

In order to prevent us from getting a `Unknown arguments: --config-cmd`
command error we must add a `--config-cmd` option to the `export:embed`
command.

Related to [ENG-12562](https://linear.app/expo/issue/ENG-12562)

Add `--config-cmd` option to `export:embed` and when a value is
supplied, do nothing with it, just to prevent the process from crashing
crash.

Build on iOS

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants