记录下创建过程,网上的手顺都很乱.
1,安装cocoapod, 苹果开发一般都装过了这个.安装方法随便搜有很多.
2,创建Lib: pod lib create [pod name]
https://guides.cocoapods.org/making/making-a-cocoapod.html
这一步控制台会有5个问题,要不要sample,要不要测试啥的,根据需求来就好.
3,创建好的pod lib推送到创建好的私有git仓库里.[基础git操作不在赘述]
这里应该有测试环节吧,暂时不需要,就没看.感觉是pod lint那套命令.
4,工程里的Podfile引用即可,例:
platform :ios, '9.0'
target 'Pod' do
use_frameworks!
pod 'AFNetworking'
pod 'ATMOCLib', :git => 'https://github.xxx.com/wxxxx/xxx.git'
#导入本地pod[追加参考]
#pod 'Name', :path => '~/code/Pods/'
end
5,在工程目录下,pod install或者pod update可以看到安装成功.