- 創(chuàng)
建索引庫
Spec.git
倉庫. 比如https://git.coding.net/leeDev/LeePublicSpec.git
- 創(chuàng)建
.podspec
文件,比如pod spec create LeeWeiXinOpenSDK_NoPay
├── Specs
└── [SPEC_NAME]
└── [VERSION] => (這里一定要把我們的目標(biāo)代碼打個(gè)tag,就是version的意思)
└── [SPEC_NAME].podspec
在
目標(biāo)
項(xiàng)目中 打tag
也就是podspec 中的版本version在
podfile
中的target
上面添加
source 'https://github.com/CocoaPods/Specs.git' #官方倉庫地址
source 'https://git.coding.net/leeDev/LeePublicSpec.git' #私有倉庫地址
pod 'LeeWeiXinOpenSDK_NoPay'
如果
索引文件
更新了, 最好 在cd .cocoapods/
文件中 刪除 我們自定義的索引, 然后重新pod udpate --no-repo-update