不确定这对其他人是否仍然有帮助。但在我的情况下,问题最终是因为我在.podspec文件中没有引用依赖项导致的一个愚蠢错误。
我们有一个具有多个内部库的应用程序,这些库彼此之间也有依赖关系 - 我们在Podfiles中考虑了这些依赖关系...但没有在podspecs中考虑。
因此,即使我们的Podfiles中有:
应用程序/Podfile
pod 'ConsumingLibrary ', :path => '../ios-consuming-lib'
pod 'DependentLibrary1', :path => '../ios-library-one'
pod 'CommonCoreLibrary', :path => '../ios-common-core-lib'
消费库 / Podfile
# Development Pods
pod 'DependentLibrary1', :path => '../ios-library-one'
pod 'CommonCoreLibrary', :path => '../ios-common-core-lib'
需要在 .podspec 文件中也进行标注:
ConsumingLibrary / ConsumingLibrary.podspec
s.dependency 'DependentLibrary1', '~> 0.1.0-RC'
DependentLibrary1 / DependentLibrary1.podspec
依赖库1 / 依赖库1.podspec
s.dependency 'CommonCoreLibrary', '~> 0.1.0-RC'
我认为我浪费了大约2个小时的时间,试图弄清楚为什么我可以构建ConsumingLibrary并运行测试,但一旦我构建了使用所有三个库的应用程序,我就不断收到以下错误信息:
找不到模块“DependentLibrary1”