@@ -20,26 +20,38 @@ Pod::Spec.new do |s|
2020 "cpp/*.{h,cpp}"
2121 ]
2222
23- s . dependency "React-Core"
24-
25- # Don't install the dependencies when we run `pod install` in the old architecture.
26- if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
27- s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
28- s . pod_target_xcconfig = {
29- "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers" ,
30- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1" ,
31- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
32- }
33- s . dependency "React-Codegen"
34- s . dependency "RCT-Folly"
35- s . dependency "RCTRequired"
36- s . dependency "RCTTypeSafety"
37- s . dependency "ReactCommon/turbomodule/core"
23+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
24+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
25+ if respond_to? ( :install_modules_dependencies , true )
26+ s . pod_target_xcconfig = {
27+ "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers" ,
28+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1" ,
29+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
30+ }
31+ install_modules_dependencies ( s )
3832 else
39- s . pod_target_xcconfig = {
40- "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers" ,
41- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1" ,
42- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
43- }
33+ s . dependency "React-Core"
34+
35+ # Don't install the dependencies when we run `pod install` in the old architecture.
36+ if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
37+ s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
38+ s . pod_target_xcconfig = {
39+ "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers" ,
40+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1" ,
41+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
42+ }
43+ s . dependency "React-Codegen"
44+ s . dependency "RCT-Folly"
45+ s . dependency "RCTRequired"
46+ s . dependency "RCTTypeSafety"
47+ s . dependency "ReactCommon/turbomodule/core"
48+ else
49+ s . pod_target_xcconfig = {
50+ "HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" $(PODS_ROOT)/../../node_modules/msgpack-cxx-6.1.0/include $(PODS_ROOT)/../keybase.xcframework/ios-arm64/Keybase.framework/Headers" ,
51+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DMSGPACK_NO_BOOST=1" ,
52+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
53+ }
54+ end
4455 end
56+
4557end
0 commit comments