我正在尝试将一系列 Pod 链接在一起以封装项目功能并遇到了问题。
我有 3 个豆荚:
- IOS-Intrasonics -> 包含 Intrasonics.framework
- IOS-Core -> 包含核心 API 和 Intrasonics 功能
- IOS-Consumer -> 包含使用核心的消费者应用程序
Intrasonics Podspec:
Pod::Spec.new do |spec|
spec.name = 'IOS-Intrasonics'
spec.version = '1.0.7'
spec.license = {
:type => 'Copyright',
:text => <<-LICENSE
Copyright 2014 Intrasonics Limited. All rights reserved.
LICENSE
}
spec.homepage = 'http://www.intrasonics.com'
spec.authors = { 'xxxx' => 'xxxxx' }
spec.summary = 'Intrasonics SDK'
spec.source = { :git => 'git@github.com:xxxxx/IOS-Intrasonics.git', :tag => '1.0.7'}
spec.ios.deployment_target = '7.0'
spec.ios.vendored_frameworks = 'src/IntrasonicsDecoder.framework'
spec.ios.frameworks = 'AVFoundation', 'AudioToolbox'
spec.requires_arc = true
end
IOS-Core Podspec:
Pod::Spec.new do |spec|
spec.name = 'IOS-Core'
spec.version = '1.0.0'
spec.license = {
:type => 'Copyright',
:text => <<-LICENSE
Copyright 2014 xxxxxxx. All rights reserved.
LICENSE
}
spec.authors = { 'xxxx' => 'xxxx' }
spec.homepage = 'xxxx'
spec.summary = 'Core'
spec.source = { :git => 'git@github.com:xxxx/IOS-Core.git', :tag => '1.0.0'}
spec.ios.deployment_target = '7.0'
spec.ios.public_header_files = 'Core/Core/**/*.h'
spec.ios.source_files = 'Core/Core/**/*.{h,m}'
spec.ios.dependency 'AFNetworking'
spec.ios.dependency 'IOS-Intrasonics'
spec.requires_arc = true
end
这两个 Pod 都位于私有存储库中。现在,当我pod spec lint
在 IOS-Core 上运行时,它会返回:
$ pod spec lint
-> IOS-Core (1.0.0)
- ERROR | [xcodebuild] IOS-Core/Core/Core/Models/Events/FNXCIntrasonicsEvent.m:11:9: fatal error: 'IntrasonicsDecoder/IntrasonicsDecoder.h' file not found
- ERROR | [xcodebuild] IOS-Core/Core/Core/Helpers/Core/FNXCIntrasonicsManager.m:13:9: fatal error: 'IntrasonicsDecoder/IntrasonicsDecoder.h' file not found
Analyzed 1 podspec.
[!] The spec did not pass validation.
尽管 Podspec 将 IOS-Intrasonics 列为依赖项,但它并没有链接它。IOS-Intrasonics 包含在 Podfile 中并且在项目中工作得很好,但它不能作为依赖项工作。请帮忙!