Skip to content

Commit 6939021

Browse files
authored
[RN][iOS] Improve Swift support for 3rd party libs (#42075)
1 parent c3fda24 commit 6939021

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Pod::Spec.new do |s|
3333
s.source = source
3434
s.source_files = "dummyFile.cpp"
3535
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
36-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
36+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
37+
"DEFINES_MODULE" => "YES" }
3738

3839
if ENV['USE_FRAMEWORKS']
3940
s.header_mappings_dir = './'

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ Pod::Spec.new do |s|
2727
s.source = source
2828
s.source_files = "**/*.{cpp,h}"
2929
s.header_dir = "react/debug"
30-
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
30+
s.pod_target_xcconfig = {
31+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
32+
"DEFINES_MODULE" => "YES"
33+
}
3134

3235
if ENV['USE_FRAMEWORKS']
3336
s.module_name = "React_debug"

packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ Pod::Spec.new do |s|
4949
header_search_paths = header_search_paths + ["\"$(PODS_TARGET_SRCROOT)/platform/ios\""]
5050
end
5151

52-
s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => header_search_paths.join(" ") }
52+
s.pod_target_xcconfig = {
53+
"USE_HEADERMAP" => "NO",
54+
"HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
55+
"DEFINES_MODULE" => "YES"
56+
}
5357

5458
s.dependency "glog"
5559
s.dependency "RCT-Folly/Fabric", folly_version

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ Pod::Spec.new do |s|
4444
s.exclude_files = "tests"
4545
s.pod_target_xcconfig = {
4646
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
47-
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
47+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
48+
"DEFINES_MODULE" => "YES"
49+
}
4850

4951
if ENV['USE_FRAMEWORKS']
5052
s.module_name = "React_utils"

0 commit comments

Comments
 (0)