创建自己的pod仓库

来源:互联网 发布:php网页编辑软件有哪些 编辑:程序博客网 时间:2024/05/01 15:46

cocoa pod 创建步骤

安装cocoapods

打开终端输入如下命令

 gem install cocoapods

创建项目

在终端输入如下命令,按步骤回答[问题][6]

 pod lib create [项目名称]

使用 pod lib lint 检查podspec文件是否符合问题

在终端输入如下命令,根据提示解决出现的问题

 pod lib lint *.podspec

使用 git命令将项目上传到githu版本管理服务器上

在终端输入如下命令

$git add .$git commit -m “Initial Commit"$git remote add origin https://github.com/<GITHUB_USERNAME>/BlinkingLabel.git // replace <GITHUB_USERNAME> with your github.com username$git push -u origin master

编写pod的class文件

找到Pods development 文件夹下面的 Classes文件夹,在其下面添加需要使用的类库文件

$git add .$git commit -m “Initial Commit"$git remote add origin https://github.com/<GITHUB_USERNAME>/BlinkingLabel.git // replace <GITHUB_USERNAME> with your github.com username$git push -u origin master

让自己的pod生效

通过pod trunk 去将自己的pod上传到cocoa pods的仓库
如果没有注册cocoapods 则使用命令

$ pod trunk register name@example.org 'Your Name' --description='macbook pro'

使用push命令提交自己的podspec到cocoapods仓库

$ pod trunk push your-library.podspec
0 0
原创粉丝点击