react-native-macos/scripts
Danilo Bürger 9e7d91f2fc Re-apply: Consider relative to pwd installation root when looking for files in rn module via cocoapods (#33427)
Summary:
This re-applies Consider relative to pwd installation root when looking for files in rn module via cocoapods by danilobuerger

The `:reactNativePath` provided by `use_native_modules!` is the rn module path relative to the installation root (usually `./ios`). However, when executing cocoapods from a dir thats not the installation root, packages that use the relative `:reactNativePath` variable in their path must also consider the relative to pwd installation root.

This fixes usage of cocoapods with the `--project-directory` flag like

```bash
bundle exec pod install --project-directory=ios
```
## Changelog

[iOS] [Fixed] - Fix usage of cocoapods with --project-directory flag and new arch

Pull Request resolved: https://github.com/facebook/react-native/pull/33427

Test Plan:
1) Enable the new arch
2) Execute from the projects root dir

```bash
bundle exec pod install --project-directory=ios
```

3) It will fail with

```
[!] Invalid `Podfile` file: [codegen] Couldn't not find react-native-codegen..
```

4) Apply the patch
5) Execute from the projects root dir

```bash
bundle exec pod install --project-directory=ios
```

6) It will succeed

Reviewed By: cortinico

Differential Revision: D34890926

Pulled By: dmitryrykun

fbshipit-source-id: f7adc6196874822d5ff38f275414f529d385f2ea
2022-03-16 05:25:28 -07:00
..
__tests__ Use CircleCI API to trigger releases (#32937) 2022-01-24 14:08:43 -08:00
circleci Download kotlin compiler JARs for Buck instead of checking them in (#33209) 2022-03-02 13:04:49 -08:00
react_native_pods_utils Remove `find-node.sh` script (#33146) 2022-02-21 03:23:40 -08:00
versiontemplates Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
.packager.env Move YGStyle to seperate file and add constructors 2018-02-20 05:55:36 -08:00
.tests.env Bump OSS Android build to SDK 31 (#32606) 2021-11-24 12:27:26 -08:00
android-e2e-test.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
android-setup.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
bump-hermes-version.js Add script for bumping Hermes version for a release 2022-02-25 10:52:55 -08:00
bump-oss-version.js Use CircleCI API to trigger releases (#32937) 2022-01-24 14:08:43 -08:00
compose-source-maps.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
download-kotlin-compiler-with-buck.sh Download kotlin compiler JARs for Buck instead of checking them in (#33209) 2022-03-02 13:04:49 -08:00
generate-api-docs.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-artifacts.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-provider-cli.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-specs-cli.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
ios-configure-glog.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
launchPackager.bat Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
launchPackager.command Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
lint-java.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
node-binary.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
objc-test.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
packager-reporter.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
packager.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
prepare-package-for-release.js Use CircleCI API to trigger releases (#32937) 2022-01-24 14:08:43 -08:00
process-podspecs.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
publish-npm.js Bundle Hermes source code in react-native npm package 2022-02-22 12:23:49 -08:00
react-native-xcode.sh Remove `find-node.sh` script (#33146) 2022-02-21 03:23:40 -08:00
react_native_pods.rb Re-apply: Consider relative to pwd installation root when looking for files in rn module via cocoapods (#33427) 2022-03-16 05:25:28 -07:00
run-android-ci-instrumentation-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-emulator.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
run-android-local-integration-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-local-unit-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-ci-e2e-tests.js Updating Yarn Cache path to fix broken CI (#32834) 2022-01-06 10:46:15 -08:00
run-ci-javascript-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-instrumentation-tests-via-adb-shell.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
set-rn-template-version.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
set-rn-version.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
sync-css-layout.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
test-manual-e2e.sh fix: Access to relative paths when invoking test-manual-e2e (#33000) 2022-02-03 09:10:11 -08:00
try-n-times.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
update-ruby.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
update_podfile_lock.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
validate-android-device-env.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-android-sdk.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-android-test-env.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-ios-test-env.sh bump Node references from 12/14 to 14/16 (#32980) 2022-01-28 05:07:18 -08:00
version-utils.js Use CircleCI API to trigger releases (#32937) 2022-01-24 14:08:43 -08:00