Cocopods私有库

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容