I'm trying to set up the following arrangement of private Cocoapods:
PodA
depends on PodB
which depends on CommonCrypto
.
CommonCrypto
is a dylib
that ships with iOS but doesn't have a Swift
header module. Within PodB
I've created a custom module.modulemap
with the following contents:
module CommonCrypto [system] {
header "/usr/include/CommonCrypto/CommonCrypto.h"
}
PodB
passes the lint test (pod spec lint PodB.podspec
) after adding the following lines:
# Ensure module isn't deleted by CocoaPods
s.preserve_paths = 'path_to/PodB/CommonCrypto'
s.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/path_to/CommonCrypto' }
Within PodA
, I depend on PodB
with s.dependency = 'PodB'
. When linting PodA
with pod spec lint --sources=myrepo PodA.podspec
I get an error compiling any Swift
file with import PodB
:
missing required module 'CommonCrypto'
How can I go about fixing this? It doesn't matter to me if CommonCrypto
is private or public to PodB
.
I tried adding export *
to module.modulemap
but that made no difference.