pod update注意事项

在上一节《仓库迁移后需要注意的地方》中指定了两个pod仓库,第一个是Specs,另一个是HoriSpecs。这里主要说下原理性的东西:

1、pod官方的公共库是放在github上,因为公司网络原因,如果直接从github上clone,很大可能会失败。所以在公司内部搭建一个pod公有库的镜像;

2、pod公共库在本地的名字一定是master:

master
- Type: git (master)
- URL:  ssh://git@192.168.51.75/source/Specs.git
- Path: /Users/chenjiangchuan/.cocoapods/repos/master

3、如果没有在podfile文件中指定公司内网的Specs地址,直接pod update,会导致本地master的URL地址重新指向官方提供的github地址:

master
- Type: git (master)
- URL:  https://github.com/CocoaPods/Specs.git
- Path: /Users/chenjiangchuan/.cocoapods/repos/master

4、如果这时你才在podfile中指定内网的Specs地址,然后pod update,会导致再次从ssh://git@192.168.51.75/source/Specs.git拷贝一份库到本地,而名字是另一个:

51-75-specs
- Type: git (master)
- URL:  ssh://git@192.168.51.75/source/Specs.git
- Path: /Users/chenjiangchuan/.cocoapods/repos/master

results matching ""

    No results matching ""