Skip to content

Commit 1033dbd

Browse files
cipolleschimeta-codesync[bot]
authored andcommitted
Fix Dynamic framework build and resolve circular dependency for JSC (#54421)
Summary: OSS community shared with me that we have a circular dependency in React-utils.podspec that prevent them from building with JSC. While fixing it, I realized that the dynamic framework build was broken. So I fixed them both. ## Changelog: [iOS][Fixed] - Fixed build with dynamic frameworks Pull Request resolved: #54421 Test Plan: Build RNTester locally with USE_FRAMEWORKS=dynamic Reviewed By: javache Differential Revision: D86309592 Pulled By: cipolleschi fbshipit-source-id: f2995332ae135ce951480b353df7d597ff8a85ec
1 parent ef6f3f6 commit 1033dbd

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

packages/react-native/React/CoreModules/React-CoreModules.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Pod::Spec.new do |s|
6161
add_dependency(s, "React-RCTFBReactNativeSpec")
6262
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
6363
add_dependency(s, "React-NativeModulesApple")
64+
add_dependency(s, "React-utils", :additional_framework_paths => ["react/utils/platform/ios"])
6465

6566
add_rn_third_party_dependencies(s)
6667
add_rncore_dependency(s)

packages/react-native/React/Runtime/React-RCTRuntime.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Pod::Spec.new do |s|
5656

5757
add_dependency(s, "React-RuntimeCore")
5858
add_dependency(s, "React-RuntimeApple")
59+
add_dependency(s, "React-utils", :additional_framework_paths => ["react/utils/platform/ios"])
5960

6061
if use_third_party_jsc()
6162
s.exclude_files = ["RCTHermesInstanceFactory.{mm,h}", "RCTJscInstanceFactory.{mm,h}"]

packages/react-native/ReactCommon/cxxreact/React-cxxreact.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Pod::Spec.new do |s|
4444
s.dependency "React-logger", version
4545
s.dependency "React-debug", version
4646
s.dependency "React-timing", version
47+
add_dependency(s, "React-utils", :additional_framework_paths => ["react/utils/platform/ios"])
4748

4849
s.resource_bundles = {'React-cxxreact_privacy' => 'PrivacyInfo.xcprivacy'}
4950

packages/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Pod::Spec.new do |s|
3737
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
3838
add_dependency(s, "React-jsinspectorcdp", :framework_name => 'jsinspector_moderncdp')
3939
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
40+
add_dependency(s, "React-utils", :additional_framework_paths => ["react/utils/platform/ios"])
4041
if use_hermes()
4142
s.dependency 'hermes-engine'
4243
end

packages/react-native/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Pod::Spec.new do |s|
4848
s.dependency "React-oscompat"
4949
s.dependency "React-timing"
5050

51+
if use_hermes()
52+
s.dependency "hermes-engine"
53+
end
54+
5155
add_rn_third_party_dependencies(s)
5256
add_rncore_dependency(s)
5357
end

packages/react-native/ReactCommon/jsitooling/React-jsitooling.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Pod::Spec.new do |s|
4242
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
4343
add_dependency(s, "React-jsinspectorcdp", :framework_name => 'jsinspector_moderncdp')
4444
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
45+
add_dependency(s, "React-utils", :additional_framework_paths => ["react/utils/platform/ios"])
4546

4647
add_rn_third_party_dependencies(s)
4748
add_rncore_dependency(s)

packages/react-native/ReactCommon/react/utils/React-utils.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ Pod::Spec.new do |s|
4747

4848
s.dependency "React-jsi", version
4949

50-
depend_on_js_engine(s)
50+
if use_hermes()
51+
s.dependency "hermes-engine"
52+
end
5153
add_rn_third_party_dependencies(s)
5254
add_rncore_dependency(s)
5355

0 commit comments

Comments
 (0)