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://ruby ...
- 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 ...
- cocoapod安装过程中的幺蛾子
cocoapod是GoogleMobileAd framework推荐的一个自动解决依赖关系的工具. 安装cocoapod时遇到问题: EthandeMacBook-Air:Xcode ethan ...
- CocoaPods安装使用以及常见问题
什么是CocoaPods CocoaPods是iOS项目的依赖管理工具,该项目源码在Github上管理.开发iOS项目不可避免地要使用第三方开源库,CocoaPods的出现使得我们可以节省设置和第三方 ...
- Firefly安装说明 与 常见问题
原地址:http://bbs.gameres.com/thread_223688.html 第三方库依赖: twisted, python-memcached ftp://ftp.tummy.c ...
- Cocoapod安装 - 管理第三方库
在我们开发移动应用的时候,一般都会使用到第三方工具,而由于第三方类库的种类繁多,我们在项目中进行管理也会相对麻烦,所以此时我们就需要一个包管理工具,在iOS开发中,我们使用最多的就是Cocoapods ...
- CocoaPods的安装使用和常见问题
一.什么是CocoaPods CocoaPods是iOS项目的依赖管理工具,该项目源码在Github上管理.开发iOS项目不可避免地要使用第三方开源库,CocoaPods的出现使得我们可以节省设置和第 ...
随机推荐
- iOS:创建静态库及其使用
本篇来自转载,原创链接为:http://my.oschina.net/leejan97/blog/284193 摘要: 静态库文件可以有效的将功能封装和细节隐藏 ios 静态库 static lib ...
- MySQL数据库分片技术调研
将这段时间了解的MySQL分片技术和主从复制只是整理清楚画了思维导图记录一下,希望能给需要的人一些帮助 P.S.:个人整理,可能会有错误之处,还望指出~ 要解决的问题 1.海量数据的操作超出单表.单库 ...
- IReferenceCounted DotNetty.Common
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file ...
- Windows 10系统专业精简
第1页:捆绑应用一键卸载 随着微软彻底放弃win7的更新,win8的弱势,新一代的win10系统则成为了微软着力打造的王牌系统. 作为微软最新的王牌产品,win10系统从功能到外观都有着超过前代产品的 ...
- Mac机装Win7后 启动只见鼠标怎么办
我有一台Mac机,用Bootcamp的方式装了Win7,昨天一按开机键发现只有鼠标没有别的. 当时按热启动无效,把笔记本盖子合上一会再开也无效,按关机键关掉再开也无效(这时是短按). 当时想是不是Ma ...
- mybatis 自动更新表结构 ,兼容通用tkmapper
1.maven引入jar <dependency> <groupId>com.github.gonglb.tools</groupId> <artifactI ...
- vue sync用法
1.父组件 <add-rule :show.sync="showEditDialog" :addOrUpdate="addOrUpdate" @close ...
- LoadRunner+Java接口性能测试
想必各位小伙伴们会对LR还可以调用java感到好奇,之前我也这么一直认为LR只支持C语言.其实LR脚本支持的语言有:C.Java.Visual Basic.VbScript.JavaScript,只不 ...
- 使用sql语句实现添加、删除约束
--主键约束(Primary Key constraint):要求主键列的数据唯一,并且不允许为空. --唯一约束(Unique Constraint):要求该列唯一,允许为空,但只能出现一个空值. ...
- asp.net+mvc+easyui+sqlite 简单用户系统学习之旅—— 摘要
首次接触asp.net开发,希望把自己的学习之旅写下来,一方面做个知识归纳技术总结,另一方面开放到博客中,和大家一起交流学习! asp.net是目前流行的web开发技术之一,是微软旗下开发的基于.ne ...