创建私有Cocoapods库
2015-07-27 18:20
281 查看
环境:
1、CocoaPod 0.36.4 2、xcode6 3、注册好的代码管理网站Coding(https://coding.net),其他的也可以
步骤
在coding上创建一个空的仓库本地创建pod工程文件:
命令如下:pod lib create SLTest4
上传到远程仓库
git add.
git commit -m “init pod”
git remote add origin https://git.coding.net/shulong/SLTest4.git
git push -u origin master
添加tag
git tag -m “first tag” “0.1.0”
git push –tags
编辑Podspec Metadata中的podspec文件编辑好的内容如下
Pod::Spec.new do |s| s.name = "SLTest4" s.version = "0.1.0" s.summary = "A private pod test" s.description = <<-DESC a private pod test DESC s.homepage = "https://coding.net/u/shulong/p/SLTest4/git" s.license = 'MIT' s.author = { "LiuShulong" => "bigfish_liu@126.com" } s.source = { :git => "https://git.coding.net/shulong/SLTest4.git", :tag => s.version.to_s } s.platform = :ios, '7.0' s.requires_arc = true s.source_files = 'Pod/Classes/**/*' s.resource_bundles = { 'SLTest4' => ['Pod/Assets/*.png'] } end
name指的是该pod的名字,version为pod的版本,summary和description为概述和描述,homepage直接位仓库的主页,license一般MIT,source_files为要添加的pod代码的位置,具体的可查阅官网,这里的注释最好去掉,否则后边可能引起错误
6.有效性检测:pod lib lint,当出现 -> SLTest4 (0.1.0)
SLTest4 passed validation.
表示检测通过,进入下一步
7.向spec提交podspec
pod repo add SLTest4 https://git.coding.net/shulong/SLTest4.git
pod repo push SLTest4 SLTest4.podspec
8.使用Podfile如下
platform :ios, ‘7.0’
source “https://git.coding.net/shulong/SLTest4.git”
pod “SLTest4”
最后:如果升级或删除某个pod,则pod repo remove XXX
链接:
创建pod
使用私有pod lib创建
相关文章推荐
- STM32 SysTick 精确延时(非中断方式)
- Zabbix监控之检测程序日志中错误发生的次数
- hdoj 2647 Reward(逆向拓扑排序+队列)
- centOS下的nginx1.8.0多站点配置(同一IP,不同端口)
- TabHost的两种使用方法
- vs2010+pcl遇到的无法解析的外部命令
- codeforce Gym 100500I Hall of Fame (水)
- CSS选择器的权重与优先规则(转)
- Nginx配置文件说明
- sycPHPCMS v1.6 cookie sqlinjection
- Android_软键盘遮挡的四种解决方案
- hdoj-1811-Rank of Tetris【并查集+拓扑排序】
- ERROR while getting interface flags: No such device
- android去权限反编译,签名,zipalign优化
- POJ-1611 The Suspects
- 详细解读JavaScript编程中的Promise使用
- android底部菜单栏实现原理与代码
- KVC该机制
- CSS制作水平垂直居中对齐
- android反编译