mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make fmt and SocketRocket compatible with Swift (#50874)
Summary: `SocketRocket` and `fmt` are part of React Native dependencies. If a library is written in swift and depends on them, it will fail to install the pods because these pods are not compatible with Swift. This change makes sure that the pods are installed in a way that is swift compatible. ## Changelog: [iOS][Fixed] - Make fmt and SocketRocket Swift friendly Pull Request resolved: https://github.com/facebook/react-native/pull/50874 Test Plan: Tested locally in a nightly app. ### Before the change: ``` yarn add react-native-video cd ios bundle exec pod install ``` This script resulted in this error: ``` [!] The following Swift pods cannot yet be integrated as static libraries: The Swift pod `react-native-video` depends upon `fmt` and `SocketRocket`, which do 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. ``` ### After the change ``` yarn add react-native-video cd ios bundle exec pod install ``` This script installed pods successfully. Reviewed By: cortinico Differential Revision: D73512109 Pulled By: cipolleschi fbshipit-source-id: 222d85dba1cbdf4044e3c8459008a4083a720016
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b9b61f002c
commit
3f41fe2948
@@ -95,6 +95,7 @@ const dependencies /*: $ReadOnlyArray<Dependency> */ = [
|
||||
headerSearchPaths: ['include'],
|
||||
linkedLibraries: ['c++'],
|
||||
cxxCompilerFlags: [`-std=${CPP_STANDARD}`],
|
||||
defines: [{name: 'DEFINES_MODULE', value: 'YES'}],
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -159,6 +160,7 @@ const dependencies /*: $ReadOnlyArray<Dependency> */ = [
|
||||
'SocketRocket/Internal/Security',
|
||||
'SocketRocket/Internal/Utilities',
|
||||
],
|
||||
defines: [{name: 'DEFINES_MODULE', value: 'YES'}],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user