Skip to content

Commit 1d80586

Browse files
kkafarfacebook-github-bot
authored andcommitted
Enable Defines Module option for RCTImage pod (facebook#51974)
Summary: This is to enable consuming RCTImage pod in mixed ObjC/Swift codebase. W/o this option set I get following error when building the library: ``` Installing RNScreens 4.11.1 [!] The following Swift pods cannot yet be integrated as static libraries: The Swift pod `RNScreens` depends upon `React-RCTImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` I've noticed that there is also a precedent in the form of facebook@c8fcac2, which handled very simlar case but for `React-jsc` pod. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - Allow for consuming RCTImage in Swift codebase by enabling "Defines Module" option Pull Request resolved: facebook#51974 Test Plan: RNTester should build & run correctly Reviewed By: cortinico Differential Revision: D76505478 Pulled By: cipolleschi fbshipit-source-id: bcce93ffc7e1c917da7f07db83a710575c659f45
1 parent d6f29c8 commit 1d80586

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/react-native/Libraries/Image/React-RCTImage.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ Pod::Spec.new do |s|
3838
s.pod_target_xcconfig = {
3939
"USE_HEADERMAP" => "YES",
4040
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
41-
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
41+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
42+
"DEFINES_MODULE" => "YES"
4243
}
4344
s.framework = ["Accelerate", "UIKit", "QuartzCore", "ImageIO", "CoreGraphics"]
4445

0 commit comments

Comments
 (0)