Skip to content

Commit

Permalink
Allow RCTAppDelegate pod to be imported as a module (#38717)
Browse files Browse the repository at this point in the history
Summary:
If another pod wants to depend on `React-RCTAppDelegate` and is written in Swift, the user needs to enable modular headers for this pod in the Podfile. This is not very convenient as this cannot be changed as part of the podspec, thus requires additional steps from the user. In Expo, our autolinking just fixes that automatically for all pods that require it (not only for RN's pods).

## Changelog:

[IOS] [CHANGED] - Set DEFINES_MODULE xcconfig in React-RCTAppDelegate to generate a module map for this pod

Pull Request resolved: #38717

Test Plan:
- rn-tester builds
- `pod install` with a dependency containing Swift code and depending on `React-RCTAppDelegate` no longer requires the user to use modular headers for this pod

Reviewed By: NickGerleman

Differential Revision: D47955835

Pulled By: cipolleschi

fbshipit-source-id: 779516a8396925e52c28b87d6fcf096357333bf5
  • Loading branch information
tsapeta authored and facebook-github-bot committed Aug 2, 2023
1 parent 3fded52 commit 7c79e31
Show file tree
Hide file tree
Showing 2 changed files with 230 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => header_search_paths,
"OTHER_CPLUSPLUSFLAGS" => other_cflags,
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
"DEFINES_MODULE" => "YES"
}
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}

Expand Down
Loading

0 comments on commit 7c79e31

Please sign in to comment.