[英]Add private pod to podfile as dependency
I'm working on pod which uses another private pod created by me and I need to add that pod somehow as a dependency in my podfile. 我正在使用使用我创建的另一个私有pod的pod进行工作,我需要以某种方式将该pod添加为我的podfile中的依赖项。
My podfile looks like: 我的podfile看起来像:
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
I tried adding as 我尝试添加为
spec.dependency 'Private pod'
spec.dependency 'Private pod' , :git => 'path-to-bitbucket-repo'
I looked for similar answers but nothing that was suggested works. 我寻找类似的答案,但没有建议的作品。
PS When i try: PS当我尝试:
pod spec lint DCCalendarMonth.podspec --sources=https://bitbucket.org/test/test.git,master
i get The spec did not pass validation, due to 1 error.
我得到The spec did not pass validation, due to 1 error.
--verbose tells me that: --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.
I need some help or guidance because I'm getting little desperate. 我需要一些帮助或指导,因为我绝望了。
Thanks. 谢谢。
Found a solution: 找到一个解决方案:
inside spec.source field you just simply create field with multiple sources: 在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
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.