我正在尝试将一系列Pod连接在一起以封装项目功能,并且已经遇到了问题。
我有3个Pod:
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都位于私有存储库中。现在,当我在IOS-Core上运行pod spec lint
时,它会返回:
$ 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中并且在项目中工作得很好,但它不能作为依赖项工作。请帮忙!
答案 0 :(得分:0)
这看起来是因为您未在规范中包含任何公共标题文件而导致您正在销售框架。你想用以下的东西做到这一点:
s.public_header_files = 'path/to/headers/*.h'
答案 1 :(得分:0)
我最后捆绑了我想用框架pod添加的类,而不是包含pod和框架的pod。