Cocoapods私有库依赖

参考链接:创建私有pods库

遇到的坑:

1、创建私有库的时候,如果私有库依赖的有三方公共库

podspec 里添加 

s.dependency 'AFNetworking' , '~> 3.0'

s.dependency 'YYModel' 

需要在--sources后面添加公有仓库地址https://github.com/CocoaPods/Specs.git,而不是对应的具体git地址

pod repo push TestSpec TestSpec.podspec --sources=https://github.com/xxx/TestSpec.git,https://github.com/CocoaPods/Specs.git


如果依赖的有其他私有库 extension


pod repo push TestSpec TestSpec.podspec --sources=https://github.com/xxx/TestSpec.git,https://github.com/xxx/extension.git


2、pod repo add realTimeBusCocoaRepo https://gitlab.com/iosCocoaPods4CMS/iOS_Cocoapods_Repo.git

添加本地索引目录之后,本地索引需要先随便儿提交点儿什么到github,比如新增个READ.ME,然后push 到master,不然后续提交索引的时候会持续报错无索引文件:Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容