mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
dc959c9271
Summary: In a mono-repo the `react-native` package could be hoisted compared to the app directory, in which case it's not a good strategy for the `react-native-xcode.sh` script to guess the app project root relative to the location of itself. Instead I suggest to relying on a build setting provided by Xcode to derive the default app path. I could have use the `SRCROOT` instead. According to https://stackoverflow.com/questions/36323031/what-the-different-between-srcroot-and-project-dir this is equivalent and also a bit less ambiguous as I see it. I.e. I would expect most Xcode projects to be located in the `ios` directory of the app. As a workaround, before this merge, users can add the following to their "Bundle React Native code and images" build phase or `ios/.xcode.env` file: ```shell export PROJECT_ROOT="$PROJECT_DIR/.." ``` This build phase can also be used for users wanting to revert this default behaviour once merged. ## Changelog [iOS] [Changed] - Changed default `PROJECT_ROOT` (used in when bundling for iOS) to rely on the `PROJECT_DIR` build setting. Pull Request resolved: https://github.com/facebook/react-native/pull/35970 Test Plan: I've updated this locally and verified this does indeed pick up the correct app path - even in a mono-repo. To verify this: - Instantiate the template with this patch applied. - Update the "Run scheme"'s "Build Configuration" to "Release". - Build the app without errors. Reviewed By: cortinico Differential Revision: D42842636 Pulled By: cipolleschi fbshipit-source-id: 040c31ac59a8abec5f5b38f795c8e74649420bac |
||
---|---|---|
.. | ||
__tests__ | ||
circleci | ||
cocoapods | ||
codegen | ||
hermes | ||
monorepo | ||
react_native_pods_utils | ||
template | ||
versiontemplates | ||
xcode | ||
.npmignore | ||
.packager.env | ||
.tests.env | ||
android-e2e-test.js | ||
android-setup.sh | ||
bump-oss-version.js | ||
compose-source-maps.js | ||
download-kotlin-compiler-with-buck.sh | ||
find-node-for-xcode.sh | ||
generate-api-docs.js | ||
generate-codegen-artifacts.js | ||
generate-provider-cli.js | ||
generate-specs-cli.js | ||
ios-configure-glog.sh | ||
launchPackager.bat | ||
launchPackager.command | ||
lint-java.js | ||
native_modules.rb | ||
node-binary.sh | ||
objc-test.sh | ||
packager-reporter.js | ||
packager.sh | ||
prepare-package-for-release.js | ||
process-podspecs.sh | ||
publish-npm.js | ||
react_native_pods.rb | ||
react-native-xcode.sh | ||
release-utils.js | ||
retry3 | ||
run_ruby_tests.sh | ||
run-android-ci-instrumentation-tests.js | ||
run-android-emulator.sh | ||
run-android-local-integration-tests.sh | ||
run-android-local-unit-tests.sh | ||
run-ci-e2e-tests.js | ||
run-ci-javascript-tests.js | ||
run-instrumentation-tests-via-adb-shell.sh | ||
scm-utils.js | ||
set-rn-template-version.js | ||
set-rn-version.js | ||
setup-verdaccio.js | ||
sync-css-layout.sh | ||
test-e2e-local-clean.js | ||
test-e2e-local.js | ||
test-manual-e2e.sh | ||
testing-utils.js | ||
try-n-times.js | ||
update_podfile_lock.sh | ||
update-ruby.sh | ||
validate-android-device-env.sh | ||
validate-android-sdk.sh | ||
validate-android-test-env.sh | ||
validate-ios-test-env.sh | ||
version-utils.js |