Skip to content

Commit 704addb

Browse files
committed
fix(ios): add new arch flag to swift
1 parent ce38492 commit 704addb

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ PODS:
12141214
- React-Core
12151215
- react-native-safe-area-context (5.2.0):
12161216
- React-Core
1217-
- react-native-true-sheet (2.0.1):
1217+
- react-native-true-sheet (2.0.2):
12181218
- DoubleConversion
12191219
- glog
12201220
- hermes-engine
@@ -1923,7 +1923,7 @@ SPEC CHECKSUMS:
19231923
React-microtasksnativemodule: 72564d5469003687d39bfc4efad281df8efc0684
19241924
react-native-maps: ee1e65647460c3d41e778071be5eda10e3da6225
19251925
react-native-safe-area-context: 849d7df29ecb2a7155c769c0b76849ba952c2aa3
1926-
react-native-true-sheet: e0f2b8f0ef57709f15474aed2527ad63975e3843
1926+
react-native-true-sheet: 7fb131224336979607e4d81c523e07f618ae3a71
19271927
React-nativeconfig: cb207ebba7cafce30657c7ad9f1587a8f32e4564
19281928
React-NativeModulesApple: 82a8bee52df9f5b378195a500f22be3a6ef0f890
19291929
React-perflogger: 8152bab3f0eb4b8751f282f9af7caed2c823a9ea

react-native-true-sheet.podspec

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ Pod::Spec.new do |s|
1616

1717
s.source_files = "ios/**/*.{h,m,mm,swift}"
1818

19+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
20+
s.pod_target_xcconfig = {
21+
# Detect if new arch is enabled in Swift code
22+
"OTHER_SWIFT_FLAGS" => "-DRCT_NEW_ARCH_ENABLED"
23+
}
24+
end
25+
1926
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
2027
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
2128
if respond_to?(:install_modules_dependencies, true)
@@ -26,10 +33,10 @@ Pod::Spec.new do |s|
2633
# Don't install the dependencies when we run `pod install` in the old architecture.
2734
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
2835
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
29-
s.pod_target_xcconfig = {
30-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
31-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
32-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
36+
s.pod_target_xcconfig = s.pod_target_xcconfig | {
37+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
38+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
39+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
3340
}
3441
s.dependency "React-RCTFabric"
3542
s.dependency "React-Codegen"

0 commit comments

Comments
 (0)