2015-11-09 25 views
0

我正在使用由我创建的另一个私人窗格的窗格,我需要将该窗格以某种方式添加为我的podfile中的依赖项。将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' => '[email protected]' } 
    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' 

我想找类似的答案,但没有什么建议的作品。

P.S.当我尝试:

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. 

我需要一些帮助或指导,因为我得到一点绝望。

谢谢。

回答

1

找到了解决办法:

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 
          }