mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
add support for USE_FRAMEWORKS when using prebuilt React Native Core (#52489)
Summary: When using prebuilts the USE_FRAMEWORKS setting is not really relevant for the React Native code, since there will not be any source code to build frameworks for - and because we already have a framework for the code in React.XCFramework. This commit adds a new command to the React Native podspecs like we did with the ReactNativeDependencies framework. The method is called `add_rncore_dependency` and it does nothing when building from source - but when linking with the React.XCFramework it explicitly adds linking with the framework. In addition there are a few places in the ruby code where we check for the USE_FRAMEWORK value and changes some settings - where needed this commit will add a separate check to ensure we're building from source when making these changes. bypass-github-export-checks ## Changelog: [IOS] [ADDED] - Added support for using USE_FRAMEWORKS with prebuilt React Native Core Pull Request resolved: https://github.com/facebook/react-native/pull/52489 Test Plan: RNTester: - Builds without USE_FRAMEWORKS as before with/without prebuilt - Builds with USE_FRAMEWORKS=dynamic as before with source - and now also with prebuilt code. - Same goes for the static variant. Reviewed By: mdvacca Differential Revision: D78012332 Pulled By: cipolleschi fbshipit-source-id: ea942738ae52b9dceae48fb78a5026f04b7545b8
This commit is contained in:
committed by
Moti Zilberman
parent
bbb322b4f4
commit
c9263e71e1
@@ -84,4 +84,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -55,4 +55,5 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -53,4 +53,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -50,4 +50,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-featureflags")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -52,4 +52,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -49,4 +49,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -49,4 +49,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -83,10 +83,6 @@ Pod::Spec.new do |s|
|
||||
ss.exclude_files = exclude_files
|
||||
ss.private_header_files = "React/Cxx*/*.h"
|
||||
|
||||
# Include prebuilt if we're not building from source
|
||||
if !ReactNativeCoreUtils.build_rncore_from_source()
|
||||
ss.dependency "React-Core-prebuilt", version
|
||||
end
|
||||
end
|
||||
|
||||
s.subspec "DevSupport" do |ss|
|
||||
@@ -137,4 +133,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -63,4 +63,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -61,6 +61,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.subspec "components" do |ss|
|
||||
ss.source_files = podspec_sources("FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/**/*.{m,mm,cpp,h}", "FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/**/*.{h}")
|
||||
|
||||
@@ -97,6 +97,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.test_spec 'Tests' do |test_spec|
|
||||
test_spec.source_files = podspec_sources("Tests/**/*.{mm}", "")
|
||||
|
||||
@@ -68,4 +68,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES" }
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = './'
|
||||
s.module_name = 'React_Fabric'
|
||||
end
|
||||
@@ -56,6 +56,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.subspec "animations" do |ss|
|
||||
ss.source_files = podspec_sources("react/renderer/animations/**/*.{m,mm,cpp,h}", "react/renderer/animations/**/*.{h}")
|
||||
|
||||
@@ -79,6 +79,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.subspec "components" do |ss|
|
||||
|
||||
|
||||
@@ -78,4 +78,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -39,5 +39,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
add_dependency(s, "React-debug")
|
||||
add_rn_third_party_dependencies(s)
|
||||
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -32,11 +32,12 @@ Pod::Spec.new do |s|
|
||||
"DEFINES_MODULE" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"GCC_WARN_PEDANTIC" => "YES" }
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = './'
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
|
||||
# Note: Update this only when ready to minimize breaking changes.
|
||||
|
||||
@@ -52,4 +52,5 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -48,4 +48,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"])
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
||||
"USE_HEADERMAP" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
|
||||
}
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = '../'
|
||||
s.module_name = 'React_jserrorhandler'
|
||||
end
|
||||
@@ -49,5 +49,6 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
end
|
||||
|
||||
@@ -46,4 +46,5 @@ Pod::Spec.new do |s|
|
||||
s.exclude_files = files_to_exclude
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -41,4 +41,5 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -60,4 +60,5 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -41,10 +41,11 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES"}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = module_name
|
||||
s.header_mappings_dir = "../.."
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES"}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = module_name
|
||||
s.header_mappings_dir = "../.."
|
||||
end
|
||||
@@ -52,4 +52,5 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-timing"
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES"}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = module_name
|
||||
s.header_mappings_dir = "../.."
|
||||
end
|
||||
@@ -50,4 +50,5 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-timing"
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
|
||||
s.source_files = podspec_sources("react/runtime/*.{cpp,h}", "react/runtime/*.h")
|
||||
s.header_dir = "react/runtime"
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "JSITooling"
|
||||
s.header_mappings_dir = "./"
|
||||
end
|
||||
@@ -46,4 +46,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -30,4 +30,5 @@ Pod::Spec.new do |s|
|
||||
s.header_dir = "logger"
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
|
||||
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES" }
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_debug"
|
||||
s.header_mappings_dir = "../.."
|
||||
end
|
||||
|
||||
@@ -37,10 +37,11 @@ Pod::Spec.new do |s|
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
||||
"DEFINES_MODULE" => "YES" }
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_featureflags"
|
||||
s.header_mappings_dir = "../.."
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -31,7 +31,7 @@ Pod::Spec.new do |s|
|
||||
"USE_HEADERMAP" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"GCC_WARN_PEDANTIC" => "YES" }
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = './'
|
||||
end
|
||||
|
||||
@@ -51,4 +51,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+1
@@ -47,6 +47,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsiexecutor"
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "React-domnativemodule"
|
||||
s.dependency "React-featureflagsnativemodule"
|
||||
|
||||
@@ -50,6 +50,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "Yoga"
|
||||
s.dependency "ReactCommon/turbomodule/core"
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "ReactCommon/turbomodule/core"
|
||||
s.dependency "React-RCTFBReactNativeSpec"
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "ReactCommon/turbomodule/core"
|
||||
s.dependency "React-runtimescheduler"
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "ReactCommon/turbomodule/core"
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
|
||||
+1
@@ -57,4 +57,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -38,7 +38,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_performancetimeline"
|
||||
s.header_mappings_dir = "../../.."
|
||||
end
|
||||
@@ -49,4 +49,5 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-perflogger"
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -18,7 +18,7 @@ end
|
||||
|
||||
header_search_paths = []
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" # this is needed to allow the renderer/css access its own files
|
||||
end
|
||||
|
||||
@@ -40,7 +40,7 @@ Pod::Spec.new do |s|
|
||||
"DEFINES_MODULE" => "YES",
|
||||
}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_renderercss"
|
||||
s.header_mappings_dir = "../../.."
|
||||
end
|
||||
|
||||
@@ -40,11 +40,12 @@ Pod::Spec.new do |s|
|
||||
"DEFINES_MODULE" => "YES"
|
||||
}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_rendererdebug"
|
||||
s.header_mappings_dir = "../../.."
|
||||
end
|
||||
|
||||
add_dependency(s, "React-debug")
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
|
||||
s.header_dir = "react/renderer/graphics"
|
||||
s.framework = "UIKit"
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_graphics"
|
||||
s.header_mappings_dir = "../../.."
|
||||
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
|
||||
@@ -51,4 +51,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+1
@@ -55,4 +55,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-rendererdebug")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -38,7 +38,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_runtimescheduler"
|
||||
s.header_mappings_dir = "../../.."
|
||||
end
|
||||
@@ -58,4 +58,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"GCC_WARN_PEDANTIC" => "YES" }
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = '../../'
|
||||
s.module_name = 'React_RuntimeCore'
|
||||
end
|
||||
@@ -52,6 +52,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "React-jsinspector"
|
||||
add_dependency(s, "React-jsitooling", :framework_name => "JSITooling")
|
||||
|
||||
@@ -32,7 +32,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"GCC_WARN_PEDANTIC" => "YES" }
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = '../../'
|
||||
s.module_name = 'React_RuntimeHermes'
|
||||
end
|
||||
@@ -52,4 +52,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-jsitooling", :framework_name => "JSITooling")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+2
-1
@@ -38,7 +38,7 @@ Pod::Spec.new do |s|
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"GCC_WARN_PEDANTIC" => "YES" }
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = './'
|
||||
s.module_name = 'React_RuntimeApple'
|
||||
end
|
||||
@@ -71,4 +71,5 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
|
||||
s.header_dir = "react/utils"
|
||||
s.exclude_files = "tests"
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.module_name = "React_utils"
|
||||
s.header_mappings_dir = "../.."
|
||||
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
|
||||
@@ -49,6 +49,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
add_dependency(s, "React-debug")
|
||||
end
|
||||
|
||||
@@ -38,4 +38,5 @@ Pod::Spec.new do |s|
|
||||
}
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
||||
s.source_files = podspec_sources(["ReactCommon/*.{m,mm,cpp,h}", "platform/ios/**/*.{m,mm,cpp,h}"], ["ReactCommon/*.h", "platform/ios/**/*.h"])
|
||||
s.header_dir = "ReactCommon"
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
if ENV['USE_FRAMEWORKS'] && ReactNativeCoreUtils.build_rncore_from_source()
|
||||
s.header_mappings_dir = '.'
|
||||
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
|
||||
end
|
||||
@@ -44,6 +44,7 @@ Pod::Spec.new do |s|
|
||||
"DEFINES_MODULE" => "YES" }
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.dependency "React-jsi", version
|
||||
add_dependency(s, "React-featureflags")
|
||||
|
||||
@@ -132,6 +132,7 @@ class NewArchitectureHelper
|
||||
|
||||
depend_on_js_engine(spec)
|
||||
add_rn_third_party_dependencies(spec)
|
||||
add_rncore_dependency(spec)
|
||||
|
||||
spec.pod_target_xcconfig = current_config
|
||||
end
|
||||
|
||||
@@ -9,6 +9,18 @@ require 'rexml/document'
|
||||
|
||||
require_relative './utils.rb'
|
||||
|
||||
### Adds ReactNativeCore-prebuilt as a dependency to the given podspec if we're not
|
||||
### building ReactNativeCore from source (then this function does nothing).
|
||||
def add_rncore_dependency(s)
|
||||
if !ReactNativeCoreUtils.build_rncore_from_source()
|
||||
current_pod_target_xcconfig = s.to_hash["pod_target_xcconfig"] || {}
|
||||
current_pod_target_xcconfig = current_pod_target_xcconfig.to_h unless current_pod_target_xcconfig.is_a?(Hash)
|
||||
s.dependency "React-Core-prebuilt"
|
||||
current_pod_target_xcconfig["HEADER_SEARCH_PATHS"] ||= [] << "$(PODS_ROOT)/React-Core-prebuilt/React.xcframework/Headers"
|
||||
s.pod_target_xcconfig = current_pod_target_xcconfig
|
||||
end
|
||||
end
|
||||
|
||||
## - RCT_USE_PREBUILT_RNCORE: If set to 1, it will use the release tarball from Maven instead of building from source.
|
||||
## - RCT_TESTONLY_RNCORE_TARBALL_PATH: **TEST ONLY** If set, it will use a local tarball of RNCore if it exists.
|
||||
## - RCT_TESTONLY_RNCORE_VERSION: **TEST ONLY** If set, it will override the version of RNCore to be used.
|
||||
|
||||
@@ -255,18 +255,26 @@ class ReactNativePodsUtils
|
||||
end
|
||||
|
||||
def self.create_header_search_path_for_frameworks(base_folder, pod_name, framework_name, additional_paths, include_base_path = true)
|
||||
platforms = $RN_PLATFORMS != nil ? $RN_PLATFORMS : []
|
||||
search_paths = []
|
||||
|
||||
if platforms.empty?() || platforms.length() == 1
|
||||
base_path = File.join("${#{base_folder}}", pod_name, "#{framework_name}.framework", "Headers")
|
||||
self.add_search_path_to_result(search_paths, base_path, additional_paths, include_base_path)
|
||||
else
|
||||
platforms.each { |platform|
|
||||
base_path = File.join("${#{base_folder}}", "#{pod_name}-#{platform}", "#{framework_name}.framework", "Headers")
|
||||
# When building using the prebuilt rncore we can't use framework folders as search paths since these aren't created
|
||||
if ReactNativeCoreUtils.build_rncore_from_source()
|
||||
platforms = $RN_PLATFORMS != nil ? $RN_PLATFORMS : []
|
||||
|
||||
if platforms.empty?() || platforms.length() == 1
|
||||
base_path = File.join("${#{base_folder}}", pod_name, "#{framework_name}.framework", "Headers")
|
||||
self.add_search_path_to_result(search_paths, base_path, additional_paths, include_base_path)
|
||||
}
|
||||
else
|
||||
platforms.each { |platform|
|
||||
base_path = File.join("${#{base_folder}}", "#{pod_name}-#{platform}", "#{framework_name}.framework", "Headers")
|
||||
self.add_search_path_to_result(search_paths, base_path, additional_paths, include_base_path)
|
||||
}
|
||||
end
|
||||
else
|
||||
base_path = File.join("${PODS_ROOT}", "#{pod_name}")
|
||||
self.add_search_path_to_result(search_paths, base_path, additional_paths, include_base_path)
|
||||
end
|
||||
|
||||
return search_paths
|
||||
end
|
||||
|
||||
|
||||
+2
@@ -478,6 +478,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.script_phases = {
|
||||
'name' => 'Generate Specs',
|
||||
@@ -955,6 +956,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.script_phases = {
|
||||
'name' => 'Generate Specs',
|
||||
|
||||
@@ -82,6 +82,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.script_phases = {
|
||||
'name' => 'Generate Specs',
|
||||
|
||||
@@ -41,4 +41,5 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi", version
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user