文件支持cocoapod管理

2019-08-28  本文已影响0人  从容到没边的优雅

自己封装的类库放到cocoapod上管理

1.建仓库
2.复制git地址
3.把文件拖到目录下
4. 提交文件

注意: 一定记得要打tag,不然后面会error找不到远程的分支fatal:Remote branch 0.0.1 not found in upstream origin

5.创建.podspec文件:pod spec create文件夹名,修改里面配置
  spec.name         = "test"
  spec.version      = "0.0.1"
  spec.summary      = "ceshi"
  spec.description  = <<-DESC
                               测试cocoapod的使用
                   DESC
  spec.homepage     = "https://github.com/suqinglin113x/test"
  spec.license      = "MIT"
  spec.author             = { "suqinglin113x" => "2413561757@qq.com" }
  spec.platform     = :ios
  spec.platform     = :ios, "9.0"
  spec.source       = { :git => "https://github.com/suqinglin113x/test.git", :tag => "#{spec.version}" }
  spec.source_files  = "test","*.{h,m}"
6.注册cocoapod账号,有的跳到第7步
pod trunk me 查看信息
pod trunk register 2413561757@qq.com "suqinglin113x" //换成你自己的账号,确认邮件链接即可。
7.准备完毕,开始提交
上一篇下一篇

猜你喜欢

热点阅读