【问题标题】:Pod Installlation Getting Long Time and Not InstallPod 安装耗时较长且未安装
【发布时间】:2016-10-18 21:06:21
【问题描述】:
我正在尝试安装 Cocoapods,但在下载 AlamoFire 时它有点挂起!
有人遇到过类似的问题吗?
1) 打开终端
2) sudo gem install cocoapods
sudo gem install -n /usr/local/bin cocoapods
3) 吊舱设置
4)创建一个xcode项目
5) cd "你的项目根目录的路径"
6) 吊舱初始化
7) 打开 -a Xcode Podfile
8) pod 'Alamofire', '~> 3.4'
感觉像是被吊死了,即使等了很久也没有成功!
提前致谢!!!
【问题讨论】:
标签:
ios
swift
xcode
cocoapods
【解决方案1】:
在你的 pod 文件中使用这个 ->
**source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target 'Pod DemoTests' do
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire'
end**
这会解决你的问题..
【解决方案2】:
吊舱安装
1.sudo gem 安装 cocoapods
2.pod初始化
3.在podfile中导入需要的框架
4.pod安装
5.用工作区打开。