Ios 将专用pod作为依赖项添加到podfile
我正在制作一个pod,它使用了我创建的另一个私有pod,我需要在我的pod文件中添加这个pod作为一个依赖项 我的播客文件看起来像:Ios 将专用pod作为依赖项添加到podfile,ios,swift,cocoapods,Ios,Swift,Cocoapods,我正在制作一个pod,它使用了我创建的另一个私有pod,我需要在我的pod文件中添加这个pod作为一个依赖项 我的播客文件看起来像: Pod::Spec.new do |spec| spec.name = 'test' spec.version = '0.1' spec.license = { :type => 'BSD' } spec.homepage = 'http://www.test.co
Pod::Spec.new do |spec|
spec.name = 'test'
spec.version = '0.1'
spec.license = { :type => 'BSD' }
spec.homepage = 'http://www.test.com'
spec.authors = { 'test' => 'test@test.test' }
spec.summary = 'test module'
spec.source = { :git => 'https://bitbucket.org/test/test', :tag => spec.version.to_s }
spec.source_files = 'test'
spec.requires_arc = true
spec.ios.deployment_target = '8.0'
spec.platform = :ios, '8.0'
spec.dependency 'SnapKit'
end
我试着添加为
spec.dependency 'Private pod'
spec.dependency 'Private pod' , :git => 'path-to-bitbucket-repo'
我寻找类似的答案,但没有一个是有效的建议
当我尝试时,请注意:
pod spec lint DCCalendarMonth.podspec --sources=https://bitbucket.org/test/test.git,master
我得到由于1个错误,规范没有通过验证。
--verbose告诉我:
ERROR | [iOS] unknown: Encountered an unknown error (An unexpected version directory `Private pod subdirectory` was encountered for the `/Users/username/.cocoapods/repos/test/test` Pod in the `test` repository.) during validation.
我需要一些帮助或指导,因为我有点绝望了
谢谢。找到了解决方案:
在spec.source字段中,您只需创建包含多个源的字段:
spec.source = { :git => 'https://bitbucket.org/decodehq/test1.git', :tag => spec.version.to_s ,
:git => 'https://bitbucket.org/decodehq/test2.git', :tag => spec.version.to_s
}
这对我不起作用,因为它将覆盖第一个条目:MySpec.podspec:24:warning:key:git在第25行被复制和覆盖MySpec.podspec:24:warning:key:tag在第25行被复制和覆盖