1.创建远程库
2. 克隆到本地 git clone url https://github.com/935866988/DYCategoryTool.git(git下载地址)
3.进入本地库文件 cd /Users/galahad/Desktop/DYCategoryTool
4.创建xcode项目 pod lib create DYCategoryTool
What language do you want to use?? [ Swift / ObjC ]
> Objc
Would you like to include a demo application with your library? [ Yes / No ]
> Yes
Which testing frameworks will you use? [ Specta / Kiwi / None ]
> Specta
Would you like to do view based testing? [ Yes / No ]
> Yes
What is your class prefix?
> WY
5.把文件DYCategoryTool/Classes,然后进入Example文件夹执行pod update命令,配置podspec文件(source_files路径不需要改)
6.上传git并打tag
git add -A && git commit -m "创建版本 1.0.0."
git tag '1.0.0'
git push --tags(关联远程库git remote add origin git@git.oschina.net:yoowei/yooweiTestLibrary.git)
git push origin master(如若不行,直接强推git push --force origin master )
7、验证podspec
pod spec lint
8、pod主干注册
pod trunk register 935866988@qq.com "描述"
9、发布你的pod
pod trunk push CZCTestCode.podspec
10.成功后,依然不能 pod search 是因为之前你执行 pod search 生成了 search_index.json 此时需要删掉
rm ~/Library/Caches/CocoaPods/search_index.json
删除成功后,再执行 pod search
相关地址:https://www.cnblogs.com/czc-wjm/p/5958103.html
https://www.cnblogs.com/richard-youth/p/6289015.html
https://blog.csdn.net/jichunw/article/details/80089034
网友评论