我正在尝试设置以下私有 Cocoapods 安排:
PodA
取决于PodB
哪个取决于CommonCrypto
。
CommonCrypto
是dylib
iOS 附带但没有Swift
标头模块的一个。在PodB
我创建了一个module.modulemap
包含以下内容的自定义:
module CommonCrypto [system] {
header "/usr/include/CommonCrypto/CommonCrypto.h"
}
PodB
pod spec lint PodB.podspec
添加以下行后通过 lint 测试 ( ):
# 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' }
内,PodA
我靠着PodB
。使用s.dependency = 'PodB'
linting编译任何文件时出现错误:PodA
pod spec lint --sources=myrepo PodA.podspec
Swift
import PodB
missing required module 'CommonCrypto'
我该如何解决这个问题?CommonCrypto
对我来说是私有的还是公开的对我来说并不重要PodB
。
我尝试添加export *
,module.modulemap
但没有任何区别。