cocoapods

Cocopods私有库

2017-08-14  本文已影响19人  ericguo

1. 创建一个空的git仓库,用于存放spec文件

2. 创建需要分享出去的git代码库

3. 使用如下命令进行发布

pod repo push IRSpecs IRMonitor.podspec --source='https://github.com/iOSRunner/IRSpecs.git' (发布到私有库)

pod trunk push IRMonitor.podspec (发布到官方库)

4. 引用时在Podfile中增加source地址

source 'https://github.com/CocoaPods/Specs.git'        #官方仓库地址

source ‘https://github.com/marklin2012/O2Specs.git’        #私有仓库地址

参考:如何创建私有 CocoaPods 仓库

pod spec lint --sources='git@our-private-spec-repo:iOS/Specs.git,https://github.com/CocoaPods/Specs'

* podspec文件书写时source_files或vendored_frameworks一定要有一个。

It seems that you forgot to include a source_files definition (or vendored_frameworks if you are making a closed-source pod). You should add a line like the following to your podspec :

s.source_files="MyProject/**/*.{h,m}"

详见:Podspec validation error - File Patterns: The spec is empty

上一篇下一篇

猜你喜欢

热点阅读