Skip to content

Commit eb5f23c

Browse files
tido64facebook-github-bot
authored andcommitted
fix(ios): fix pod install --project-directory=ios failing (#37992)
Summary: ![image](https://user-images.githubusercontent.com/4123478/217618490-4f99e408-1a07-4acf-a05c-e8837562a931.png) `pod install --project-directory=ios` currently fails when new arch is enabled: react-native-async-storage/async-storage#910 - Patch for 0.71: #37993 - Patch for 0.72: #37994 ## Changelog: [IOS] [FIXED] - Fix `pod install --project-directory=...` when New Arch is enabled Pull Request resolved: #37992 Test Plan: ``` git clone https://github.com/react-native-async-storage/async-storage.git cd async-storage gh pr checkout 910 yarn RCT_NEW_ARCH_ENABLED=1 pod install --project-directory=example/ios ``` Reviewed By: cortinico Differential Revision: D46966225 Pulled By: cipolleschi fbshipit-source-id: 00b4650189175c09c9ec928f85d075890ba4c7c1
1 parent a94bbfb commit eb5f23c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def testUseReactCodegenDiscovery_whenParametersAreGood_executeCodegen
373373
'[Codegen] warn: using experimental new codegen integration'
374374
])
375375
assert_equal(codegen_utils_mock.get_react_codegen_script_phases_params, [{
376-
:app_path => "~/app",
376+
:app_path => app_path,
377377
:config_file_dir => "",
378378
:config_key => "codegenConfig",
379379
:fabric_enabled => false,
@@ -382,7 +382,7 @@ def testUseReactCodegenDiscovery_whenParametersAreGood_executeCodegen
382382
assert_equal(codegen_utils_mock.get_react_codegen_spec_params, [{
383383
:fabric_enabled => false,
384384
:folly_version=>"2021.07.22.00",
385-
:package_json_file => "../node_modules/react-native/package.json",
385+
:package_json_file => "#{app_path}/ios/../node_modules/react-native/package.json",
386386
:script_phases => "echo TestScript"
387387
}])
388388
assert_equal(codegen_utils_mock.generate_react_codegen_spec_params, [{

packages/react-native/scripts/cocoapods/codegen_utils.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def get_react_codegen_spec(package_json_file, folly_version: '2021.07.22.00', fa
133133
"React-jsi": [],
134134
"ReactCommon/turbomodule/bridging": [],
135135
"ReactCommon/turbomodule/core": [],
136-
"React-NativeModulesApple": [],
136+
"React-NativeModulesApple": [],
137137
"glog": [],
138138
"DoubleConversion": [],
139139
}
@@ -318,7 +318,7 @@ def use_react_native_codegen_discovery!(
318318
:config_key => config_key
319319
)
320320
react_codegen_spec = codegen_utils.get_react_codegen_spec(
321-
file_manager.join(react_native_path, "package.json"),
321+
file_manager.join(relative_installation_root, react_native_path, "package.json"),
322322
:folly_version => folly_version,
323323
:fabric_enabled => fabric_enabled,
324324
:hermes_enabled => hermes_enabled,

0 commit comments

Comments
 (0)