npx @react-native-community/bob create name-of-module
Go into the generated native module folder, edit the name-of-module.podspec
file. Add s.dependency "PodDependencyHere"
for each dependency right before the end
Modular headers (not sure if this is required): go to example/ios
and edit Podfile
, and do use_modular_headers!
or :modular_headers => true
for a dependency
Go to Podfile
in the main project, add pod 'name-of-module', :path => '/path/to/native/module/where/the/podspec/is'
*i tried adding , :modular_headers => true
here but it didn't work so I put use_modular_headers!
globally