将自己打代码添加到cocoapods

1,Github 上创建新站点

 

 

2, 从gitHub上 clone 一份,将源码拷贝到该目录下提交
3,开源库发布之后,需要打上tag

 git tag 0.0.1

 git push --tags  

git push -u origin master

4,进入到项目根目录下,创建podspec文件

pod spec create PodName


5,编辑podspec文件中的相关信息,有两个比较重要的地方s.sources.source_files,可以验证是否有误(不能有错误和警告):

 

pod spec lint PodName.podspec

 6,注册pod trunk

 

pod trunk register orta@cocoapods.org 'Orta Therox' --description='macbook air'

7,发布 pod trunk,在包含有.podspec文件的目录下执行

pod trunk push [NAME.podspec]

8, 更新 pod 库, 如果pod trunk push成功后无法pod search到自己的库,可执行该命令

pod setup

9,如果遇到警告 :[-Wpointer-bool-conversion], 解决办法:

pod 'TTTAttributedLabel', :inhibit_warnings => true

  

posted @ 2017-01-05 14:28  shidaying  阅读(165)  评论(0编辑  收藏  举报