Skip to content

Commit 9ffcc01

Browse files
committed
feat: update podspec
1 parent bae43ed commit 9ffcc01

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

react-native-mytracker.podspec

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,26 @@ Pod::Spec.new do |s|
1919
s.dependency "React-Core"
2020
s.dependency "myTrackerSDK", '3.2.0'
2121

22-
# Don't install the dependencies when we run `pod install` in the old architecture.
23-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
24-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
25-
s.pod_target_xcconfig = {
26-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
27-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
28-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
29-
}
30-
s.dependency "React-Codegen"
31-
s.dependency "RCT-Folly"
32-
s.dependency "RCTRequired"
33-
s.dependency "RCTTypeSafety"
34-
s.dependency "ReactCommon/turbomodule/core"
22+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
23+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
24+
if respond_to?(:install_modules_dependencies, true)
25+
install_modules_dependencies(s)
26+
else
27+
s.dependency "React-Core"
28+
29+
# Don't install the dependencies when we run `pod install` in the old architecture.
30+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
31+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
32+
s.pod_target_xcconfig = {
33+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
34+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
35+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
36+
}
37+
s.dependency "React-Codegen"
38+
s.dependency "RCT-Folly"
39+
s.dependency "RCTRequired"
40+
s.dependency "RCTTypeSafety"
41+
s.dependency "ReactCommon/turbomodule/core"
42+
end
3543
end
3644
end

react-native.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @type {import('@react-native-community/cli-types').UserDependencyConfig}
3+
*/
4+
module.exports = {
5+
dependency: {
6+
platforms: {
7+
android: {
8+
cmakeListsPath: 'generated/jni/CMakeLists.txt',
9+
},
10+
},
11+
},
12+
};

0 commit comments

Comments
 (0)