如何开发CocoaPods远程私有库

  1. 在码市上创建一个私有的代码仓库的索引库:
    在这里插入图片描述
  2. 添加远程私有索引仓库: pod repo add EricSpecs https://git.coding.net/Eric_ma/EricSpecs.git
    在这里插入图片描述
  3. 在码市上创建一个私有的代码仓库:
    在这里插入图片描述
  4. 创建描述文件: pod spec create EricRemotePrivateTest #(名称和项目名称保持一致, 后面不要添加.podspec的后缀名)
  5. 创建git管理仓库: git init
  6. 添加到暂缓区: git add .
  7. 提交到本地代码仓库: git commit -m "初始化”
  8. 添加远程代码仓库地址: git remote add origin https://git.coding.net/Eric_ma/EricRemotePrivateTest.git
  9. 拉取信息: git pull origin master
  10. 提交到远程代码仓库中: git push origin master
  11. 打标签: git tag -a ‘0.0.1’ -m "初始化”
  12. 提交远程标签: git push —tags
  13. 修改.podspec文件:
    1. 项目名称: s.name = “EricRemotePrivateTest” (默认是正确的)
    2. 版本号: s.version = “0.0.1” (默认是 0.0.1, 是找不到的)
    3. 简介: s.summary = “EricRemotePrivateTest.” (需要修改)
    4. 详细描述:s.description = <<-DESC
      “This is Eric remote private test”
      DESC
    5. 首页:s.homepage = “https://git.coding.net/Eric_ma/EricRemotePrivateTest.git
    6. 协议:s.license = “MIT” (把 example 删掉)
    7. 作者信息:s.author = { “zhanWenGe” => "403853144@qq.com" }
    8. 平台信息:s.platform = :ios, “8.0”, “最低支持的版本”
    9. 源地址:s.source = { :git => “https://git.coding.net/Eric_ma/EricRemotePrivateTest.git”, :tag => “#{s.version}” }
    10. 文件路径: s.source_files = “Classes”, "Classes/**/*.{h,m}”
    11. 打开支持arc: s.requires_arc = true
    12. 依赖框架: # s.dependency “JSONKit”, "~> 1.4”
  14. 远程验证spec文件: pod spec lint (本地验证spec文件:pod lib lint)
  15. 向远程私有索引仓库中提交索引文件: pod repo push EricSpecs EricRemotePrivateTest.podspec #(如果有警告需要忽略, 在命令尾部加上 --allow-warnings)
  16. 尝试搜索: pod search EricRemotePrivateTest

没什么问题的话就大功告成了…

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值