Skip to content

Commit 631b6a1

Browse files
Kudofacebook-github-bot
authored andcommitted
Enable DEFINES_MODULE for DoubleConversion (#42591)
Summary: since 32dab7a, `DoubleConversion` is now added as an implicit dependency for 3rd party module and it breaks swift integration. this pr tries to add the `DEFINES_MODULE` to DoubleConversion. ## Changelog: [IOS] [FIXED] - Fixed `DoubleConversion` build error from Swift integration Pull Request resolved: #42591 Test Plan: i'll need to test this on expo latest and react-native nightly build ```sh # pull latest expo repo and get template tarball $ git clone --depth 1 https://github.com/expo/expo.git $ cd expo $ yarn install $ cd templates/expo-template-bare-minimum $ npx pack --pack-destination ../../ # now create an expo app $ yarn create expo -t blank@sdk-50 sdk50 $ cd sdk50 $ yarn add react-native@nightly $ jq '.expo.runtimeVersion = { "policy": "appVersion" }' app.json > app.json.tmp && mv app.json.tmp app.json $ npx expo prebuild -p ios --template /path/to/expo/expo-template-bare-minimum-50.0.17.tgz $ cd ios $ pod install ``` then it will show the error message: ``` [!] The following Swift pods cannot yet be integrated as static libraries: The Swift pod `ExpoModulesCore` depends upon `DoubleConversion`, 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. ``` Reviewed By: cortinico Differential Revision: D53048352 Pulled By: cipolleschi fbshipit-source-id: b1e27d3d26e8543a4cb2e8062c93c68543a051c5
1 parent 41c601e commit 631b6a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-native/third-party-podspecs/DoubleConversion.podspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Pod::Spec.new do |spec|
2020

2121
spec.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/DoubleConversion\"" }
2222

23+
spec.pod_target_xcconfig = {
24+
"DEFINES_MODULE" => "YES",
25+
}
26+
2327
# Pinning to the same version as React.podspec.
2428
spec.platforms = min_supported_versions
2529

0 commit comments

Comments
 (0)