Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use $REACT_NATIVE_PATH instead of relative path (#41968)
Summary: I believe it's valuable to be able to initialise the React Native template into a mono-repo and have it work with zero updates to the configuration. In its current form the template's Xcode project makes assumptions on the relative location of the `react-native` package, while it could instead use the `REACT_NATIVE_PATH` variable set in the `scripts/cocoapods/utils.rb` script: https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/scripts/cocoapods/utils.rb#L82 via https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/template/ios/Podfile#L35 ## Changelog: [IOS] [ADDED] - Add use of the `REACT_NATIVE_PATH` in the "Bundle React Native code and images" shell script build phase. This will help apps initialized into a mono-repo which hoists the `react-native` package. Pull Request resolved: #41968 Test Plan: I initialized the React Native template into an NPM workspaces mono-repo and experienced a failure running the script phase. I updated it to the code in this PR, which resolved the issue. Reviewed By: christophpurrer, cipolleschi Differential Revision: D52240559 Pulled By: robhogan fbshipit-source-id: 1c5710c8ffe9d289f32c5ed83cb58ae27f3c931a
- Loading branch information