From ebb26cf2e420616c8bf01a5148ca4f8419b238d3 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Wed, 3 Nov 2021 17:48:19 -0700 Subject: [PATCH] fix(ios): `pod install --project-directory=ios` fails (#32489) Summary: Running `pod install` from outside the `ios` folder fails because the path to `React-Codegen` is wrong: ``` % pod install --project-directory=ios [Codegen] Generating ios/build/generated/ios/React-Codegen.podspec.json Auto-linking React Native module for target `ReactTestApp`: ReactTestApp-DevSupport Analyzing dependencies Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec` Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec` [!] No podspec found for `React-Codegen` in `ios/build/generated/ios` ``` ## Changelog [iOS] [Fixed] - `pod install --project-directory=ios` fails due to wrong path to `React-Codegen` Pull Request resolved: https://github.com/facebook/react-native/pull/32489 Test Plan: 1. Verify that `pod install` still works in `/packages/rn-tester` 2. Verify that `pod install --project-directory=ios` also works: ``` git clone https://github.com/microsoft/react-native-test-app.git cd react-native-test-app npm run set-react-version main yarn cd example pod install --project-directory=ios ``` Reviewed By: lunaleaps Differential Revision: D32158140 Pulled By: sota000 fbshipit-source-id: 98f12b0073cd911cb9de06201222d866ef7649a4 --- scripts/react_native_pods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 746f68460b1..1949325ca79 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -274,7 +274,7 @@ def generate_temp_pod_spec_for_codegen!(fabric_enabled) return { "spec" => spec, - "path" => output_dir, + "path" => $CODEGEN_OUTPUT_DIR, # Path needs to be relative to `Podfile` } end