1. 在码市上创建一个私有的代码仓库的索引库:
    如何开发CocoaPods远程私有库
  2. 添加远程私有索引仓库: pod repo add EricSpecs https://git.coding.net/Eric_ma/EricSpecs.git
    如何开发CocoaPods远程私有库
  3. 在码市上创建一个私有的代码仓库:
    如何开发CocoaPods远程私有库
  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” => "[email protected]" }
    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

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

相关文章: