Fix build errors when importing React-Core module from Swift (#38993)

Summary:
supersedes https://github.com/facebook/react-native/issues/38806
the errors are actually coming from https://github.com/facebook/react-native/commit/42d67452eb9a#diff-226ff5f87f146abfebd14a69eeb7d95c358d53da30533321e3ae9281c8acc6f0L102. we should keep c++ headers as cocoapods private headers, so that those headers will not expose into the umbrella header.

this pr also adds a swift test file to rn-tester, so we can verify the fix and prevent the similar build errors in the future.

## Changelog:

[IOS] [FIXED] - Fix build errors when importing React-Core module from Swift

Pull Request resolved: https://github.com/facebook/react-native/pull/38993

Test Plan: add a swift file in rn-tester and make sure it builds successfully

Reviewed By: cipolleschi

Differential Revision: D48414292

Pulled By: NickGerleman

fbshipit-source-id: d65273adc4bfab927d7c3db1db6bb48d3e48349e
This commit is contained in:
Kudo Chien authored and Facebook GitHub Bot committed 2023-08-18 17:31:01 -07:00
1 parent 4deb29ae1b
commit bdfa368060
5 files changed
+87 -47

No files matched your search

+1 -1
View File
@@ -99,7 +99,7 @@ Pod::Spec.new do |s|
exclude_files = exclude_files.append("React/CxxBridge/JSCExecutorFactory.{h,mm}")
end
ss.exclude_files = exclude_files
ss.private_header_files = "React/CxxLogUtils/*.h"
ss.private_header_files = "React/Cxx*/*.h"
end
s.subspec "DevSupport" do |ss|