- 创
建索引库Spec.git仓库. 比如https://git.coding.net/leeDev/LeePublicSpec.git - 创建
.podspec文件,比如pod spec create LeeWeiXinOpenSDK_NoPay
├── Specs
└── [SPEC_NAME]
└── [VERSION] => (这里一定要把我们的目标代码打个tag,就是version的意思)
└── [SPEC_NAME].podspec
在
目标项目中 打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