什么也别说了,跟着敲就行了。敲完就会了。
步骤1
新建一个工程 pod lib create LPodTest
步骤2
![](https://img.haomeiwen.com/i2440780/a1b7d3a292b5976c.png)
修改一下这里面的东西。修改这个东西的时候记得要在xcode里修改,不要用文本编辑器打开。。比如修改版本号的时候会遇到标点符号的问题。。。那是个小坑。
标点符号是斜的。然后就会报解析错误。
![](https://img.haomeiwen.com/i2440780/d4569ee0265a167f.png)
步骤3
验证一下这个
pod lib lint MyLoveTest.podspec
步骤4
新建仓库
![](https://img.haomeiwen.com/i2440780/f93d1896627b6aaf.png)
步骤5
git add .
git commit -m 'test'
git remote add origin https://github.com/<GITHUB_USERNAME>/YourPodName.git // replace <GITHUB_USERNAME> with your github.com username
git push -u origin master
步骤6
验证
pod lib lint MyLoveTest.podspec
步骤7
git tag 0.1.0
git push --tags 或git push origin 0.1.0
步骤8
pod spec lint MyLoveTest.podspec
步骤9
提交pod 到Specs仓库
pod trunk push MyloveTest.podspec
这一步可能会要求你去注册你的邮箱 比如session到期。下面是解决办法
pod trunk register (Email) 'MK Shaw' --description='' --verbose
cocoapods会给你发条邮件,然后你点开之后就注册成功了。
pod trunk me 看一下自己的信息
步骤10
pod search MyloveTest
如果出现[!] Unable to find a pod with name, author, summary, or descriptionmatching `LPodTest`
则 pod setup
如果不行则pod repo update
如果不行则cd 到~/Library/Caches/CocoaPods
删除 search_index.json
网友评论