[英]Add private pod to podfile as dependency
我正在使用使用我創建的另一個私有pod的pod進行工作,我需要以某種方式將該pod添加為我的podfile中的依賴項。
我的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
我嘗試添加為
spec.dependency 'Private pod'
spec.dependency 'Private pod' , :git => 'path-to-bitbucket-repo'
我尋找類似的答案,但沒有建議的作品。
PS當我嘗試:
pod spec lint DCCalendarMonth.podspec --sources=https://bitbucket.org/test/test.git,master
我得到The spec did not pass validation, due to 1 error.
--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
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.