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