1.首先要在github上新建仓库
![](https://img.haomeiwen.com/i9600986/468c3cdab0b364a3.png)
2.把仓库克隆到本地
2.1在桌面新建一个文件夹,名字随意。我这里就取跟仓库一样的名字吧
![](https://img.haomeiwen.com/i9600986/1c5b07a59c5fc084.png)
2.2使用终端命令
![](https://img.haomeiwen.com/i9600986/09ec417c0d6afa3d.png)
git clone https://github.com/luoshiqing/MyTestPods.git 空文件位置
2.3完了可以看到文件里边是这样的
![](https://img.haomeiwen.com/i9600986/3759f6707c275a84.png)
![](https://img.haomeiwen.com/i9600986/bfa84761b9457d64.png)
2.4使用命令生成.podspec文件 cd到桌面文件夹(MyTestPods)
pod spec create MyTestPods
这时,当前目录会多出一个文件MyTestPods.podspec
![](https://img.haomeiwen.com/i9600986/a41f9837d237a293.png)
2.5编辑MyTestPods.podspec,可以使用系统 文本编辑 打开
![](https://img.haomeiwen.com/i9600986/a909f448313dabff.png)
name与github仓库名称一致,version为仓库标签(待会会说到打标签) author需要去注册 trunk,homepage为仓库网页地址,source为git地址,swift_versions为swift语音版本,source_files 为目标文件地址,这里填写跟 MyTestPods.podspec同级的。
网友评论