Cocoapod安装使用和常见问题(转载)
1.cocoapod的按照,cocoapod是运行在ruby环境下的,在ruby环境的 ,像cocoapod这样的开源项目时放在放在rubygems服务器上面的,但国内访问https://rubygems.org/ 的时候往往会出现timeout,中国zf你懂的,我们需要把服务器地址移除,添加taobao提供的镜像地 址:http://ruby.taobao.org/
移除命令:gem sources --remove https://rubygems.org/
添加命令:gem sources -a http://ruby.taobao.org/
查看gem来源列表:$ gem sources -l
安装Cocoapod:sudo gem install cocoapods
定位到项目有podsfile文件目录下,执行命令进行安装:pod install
2.常见问题
1.有时候pod install后,打开项目编译失败,原因是git项目可能子模块,需要进行递归更新。需要进入子模块目录 执行更新命令为:git submodule update --init --recursive
2. http://blog.csdn.net/ralbatr/article/details/39082937
最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动
原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update
-------------------------------------------------------------
Last login: Tue Oct 14 19:14:29 on console
chenyisis-Mac-mini:~ chenyisi$
chenyisis-Mac-mini:~ chenyisi$ ruby -e
ruby: no code specified for -e (RuntimeError)
chenyisis-Mac-mini:~ chenyisi$sudo gem install cocoapods
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz)
gem sources --remove https://rubygems.org/
chenyisis-Mac-mini:~ chenyisi$gem sources --remove https://rubygems.org/
https://rubygems.org/ removed from sources
chenyisis-Mac-mini:~ chenyisi$ gem sources -a http://ruby.taobao.org/
http://ruby.taobao.org/ added to sources
chenyisis-Mac-mini:~ chenyisi$gem sources -l
*** CURRENT SOURCES ***
http://ruby.taobao.org/
chenyisis-Mac-mini:~ chenyisi$sudo gem install cocoapods
Password:
Fetching: i18n-0.6.11.gem (100%)
Successfully installed i18n-0.6.11
Fetching: multi_json-1.10.1.gem (100%)
Successfully installed multi_json-1.10.1
Fetching: activesupport-3.2.19.gem (100%)
Successfully installed activesupport-3.2.19
Fetching: nap-0.8.0.gem (100%)
Successfully installed nap-0.8.0
Fetching: json_pure-1.8.1.gem (100%)
Successfully installed json_pure-1.8.1
Fetching: fuzzy_match-2.0.4.gem (100%)
Successfully installed fuzzy_match-2.0.4
Fetching: cocoapods-core-0.34.2.gem (100%)
Successfully installed cocoapods-core-0.34.2
Fetching: claide-0.7.0.gem (100%)
Successfully installed claide-0.7.0
Fetching: colored-1.2.gem (100%)
Successfully installed colored-1.2
Fetching: xcodeproj-0.19.3.gem (100%)
Successfully installed xcodeproj-0.19.3
Fetching: cocoapods-downloader-0.7.2.gem (100%)
Successfully installed cocoapods-downloader-0.7.2
Fetching: cocoapods-plugins-0.3.1.gem (100%)
Successfully installed cocoapods-plugins-0.3.1
Fetching: cocoapods-try-0.4.1.gem (100%)
Successfully installed cocoapods-try-0.4.1
Fetching: netrc-0.7.7.gem (100%)
Successfully installed netrc-0.7.7
Fetching: cocoapods-trunk-0.3.0.gem (100%)
Successfully installed cocoapods-trunk-0.3.0
Fetching: escape-0.0.4.gem (100%)
Successfully installed escape-0.0.4
Fetching: open4-1.3.4.gem (100%)
Successfully installed open4-1.3.4
Fetching: cocoapods-0.34.2.gem (100%)
Successfully installed cocoapods-0.34.2
Parsing documentation for i18n-0.6.11
Installing ri documentation for i18n-0.6.11
Parsing documentation for multi_json-1.10.1
Installing ri documentation for multi_json-1.10.1
Parsing documentation for activesupport-3.2.19
unable to convert "/x80" from ASCII-8BIT to UTF-8 for lib/active_support/values/unicode_tables.dat, skipping
Installing ri documentation for activesupport-3.2.19
Parsing documentation for nap-0.8.0
Installing ri documentation for nap-0.8.0
Parsing documentation for json_pure-1.8.1
Installing ri documentation for json_pure-1.8.1
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for cocoapods-core-0.34.2
Installing ri documentation for cocoapods-core-0.34.2
Parsing documentation for claide-0.7.0
Installing ri documentation for claide-0.7.0
Parsing documentation for colored-1.2
Installing ri documentation for colored-1.2
Parsing documentation for xcodeproj-0.19.3
Installing ri documentation for xcodeproj-0.19.3
Parsing documentation for cocoapods-downloader-0.7.2
Installing ri documentation for cocoapods-downloader-0.7.2
Parsing documentation for cocoapods-plugins-0.3.1
Installing ri documentation for cocoapods-plugins-0.3.1
Parsing documentation for cocoapods-try-0.4.1
Installing ri documentation for cocoapods-try-0.4.1
Parsing documentation for netrc-0.7.7
Installing ri documentation for netrc-0.7.7
Parsing documentation for cocoapods-trunk-0.3.0
Installing ri documentation for cocoapods-trunk-0.3.0
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for open4-1.3.4
Installing ri documentation for open4-1.3.4
Parsing documentation for cocoapods-0.34.2
Installing ri documentation for cocoapods-0.34.2
18 gems installed
chenyisis-Mac-mini:~ chenyisi$ cd /Users/chenyisi/Desktop/ios/SwiftWeather-master
chenyisis-Mac-mini:SwiftWeather-master chenyisi$pod install
Setting up CocoaPods master repo
Setup completed
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.3.1)
Generating Pods project
Integrating client project
[!] The use of implicit sources has been deprecated. To continue using all of the sources currently on your machine, add the following to the top of your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
chenyisis-Mac-mini:SwiftWeather-master chenyisi$
Cocoapod安装使用和常见问题(转载)的更多相关文章
- Cocoapod安装使用和常见问题
1.cocoapod的按照,cocoapod是运行在ruby环境下的,在ruby环境的 ,像cocoapod这样的开源项目时放在放在rubygems服务器上面的,但国内访问https://rubyge ...
- wdcp的安装方法与常见问题
wdcp(WDlinux Control Panel)是一套用PHP开发的Linux服务器管理系统,通过面板来操作可以彻底放弃用ssh 命令来操作的繁琐,让Linux服务器系统变得更容易使用,可以在线 ...
- Cocoapod安装使用
近期换工作.项目中推荐使用Cocoapod,把经常使用的第三方库增加到project中,大致说一下流程,标记一下. 第一步:安装 CocoaPods是跑在Ruby的软件,安装可能须要几分钟.打开你的终 ...
- cocoapods 安装过程及常见问题
1.可以参考这个网页的教程:http://code4app.com/article/cocoapods-install-usage 2.按照以下步骤进行安装: 1.配置rugy静态环境 gem sou ...
- 在CentOS 7/6.5/6.4 中安装Java JDK 8(转载)
转载在CentOS 7/6.5/6.4 中安装Java JDK 8 首先,在你的服务器上运行一下更新. yum update 然后,在您的系统上搜索,任何版本的已安装的JDK组件. rpm -qa | ...
- php扩展memcached和memcache的安装配置方法:转载
本文转载:http://www.jb51.net/article/56999.htm php连接memcached缓存服务器的客户端有两个,一个是memcache是比较底层的开发库,memcached ...
- cocoapod安装过程中的幺蛾子
cocoapod是GoogleMobileAd framework推荐的一个自动解决依赖关系的工具. 安装cocoapod时遇到问题: EthandeMacBook-Air:Xcode ethan ...
- win7环境下安装运行gotour【转载整理】
转载请注明出处:http://www.cnblogs.com/Vulpers/p/5562586.html 最近尝试学习golang,在某个网站(真忘了)上发现gotour是一款灰常叼的教程& ...
- CocoaPods安装使用以及常见问题
什么是CocoaPods CocoaPods是iOS项目的依赖管理工具,该项目源码在Github上管理.开发iOS项目不可避免地要使用第三方开源库,CocoaPods的出现使得我们可以节省设置和第三方 ...
随机推荐
- EntityFramework5提供的迁移工具
目录 背景之前是如何做的?EntityFramework5提供了更好的选择备注 背景返回目录 刚毕业做项目的时候,没有用“迁移”这个概念,系统发布和更新的过程让人非常痛苦,在学习 Ruby On Ra ...
- JavaScript function函数种类介绍
JavaScript function函数种类介绍 本篇主要介绍普通函数.匿名函数.闭包函数 1.普通函数介绍 1.1 示例 ? 1 2 3 function ShowName(name) { ...
- eclipse plugin 导出插件包
当我们的插件在完成一个阶段性开发的时候,我们要发布一个1.0的版本.这个时候会碰到一个问题.如何把我们的插件打成包?有多种途径,下面具体讨论一下. 首先从插件完成到被他人(或者我们自己)使用有两个步骤 ...
- java正则表达式验证汉字
统计指定内容的汉字个数: String str = "北京欢迎你 hello welcome!"; int count=0; Pattern pattern = Pattern.c ...
- java的抽象类和抽象方法(注意查看如何调用抽象类中的非抽象方法)
抽象类就是不能使用new方法进行实例化的类,即没有具体实例对象的类.抽象类有点类似“模板”的作用,目的是根据其格式来创建和修改新的类.对象不能由抽象类直接创建,只可以通过抽象类派生出新的子类,再由其子 ...
- 提高Java代码质量的Eclipse插件之Checkstyle的使用详解
提高Java代码质量的Eclipse插件之Checkstyle的使用详解 CheckStyle是SourceForge下的一个项目,提供了一个帮助JAVA开发人员遵守某些编码规范的工具.它能够自动化代 ...
- easyUI datagrid 动态绑定列名称
easyUI 基于Jquery ,所以需要引用Jquery文件 easyUI自带了很多样式文件,可以根据需要,引用相应的css文件. 其中datagrid是一个根据json数据,js前端生成前端显示的 ...
- TCMalloc小记
周末抽空看了一下tcmalloc,了解了个大概.下面记录一下. 一. 原理 tcmalloc就是一个内存分配器,管理堆内存,主要影响malloc和free,用于降低频繁分配.释放内存造成的性能损耗,并 ...
- ADO.NET—两种连接模式
一.ADO.NET简介 ADO.NET的名称起源于ADO(ActiveX Data Objects),这是一个广泛的类组,用于在以往的Microsoft技术中访问数据.用来访问数据库,.NET环境下首 ...
- 用docker cluster store实现kuryr的共享subnet
kuryr共享网络 在上一篇分享中,提到共享网络需要在10.8.65.80和10.8.65.81上分别通过docker network create来创建网络.而实际上,通过对docker源码的解读, ...