cocoapods 安装
来源:互联网 发布:如何开展网络推广 编辑:程序博客网 时间:2024/06/08 17:52
Control+c 终端停止当前运行的命令
gem sources -l //检查当前是否有ruby的网站源
*** CURRENT SOURCES ***
// 如果返回是这个的话,证明没有课下载的ruby的源, 正常返回应该是:*** CURRENT SOURCES *** https://ruby.taobao.org/
// 或者是 *** CURRENT SOURCES *** https://rubygems.org/
//因为https://rubygems.org/在墙外,因此需要删除https://rubygems.org/网址,添加 https://ruby.taobao.org/
//因此有下面的命令
$ gem sources --remove https://rubygems.org/
source https://rubygems.org/ not present in cache //删除https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/ //添加https://ruby.taobao.org/
https://ruby.taobao.org/ added to sources
$ gem sources -l //检查当前的ruby安装源
*** CURRENT SOURCES ***
https://ruby.taobao.org/
$ sudo gem install cocoapods //安装
17 gems installed //安装成功
cd 到程序的目录 //
$ ls
$ cd Documents/
$ cd CameraSwift/
touch Podfile (创建Podfile)
8、vim Podfile(编辑命令)按i(开始编辑)
输入:
platform:ios,'7.0'
pod 'XXX','~>0.1.1'
9、esc shift :wq 退出
10、pod install
<span style="font-family:FangSong;"><span style="font-size: 14px;">pod install <wbr>被墙了,请大家换成pod install --verbose --no-repo-update</wbr></span></span>
ps:VKVideoPlayer demo会出现问题,大多数是Podfile文件里的配置有问题
这是改好了的,可以参考一下
platform :ios, '5.1.1'
pod 'DTCoreText', '~> 1.6.11'
pod 'AFNetworking', '1.3.3'
pod "VKVideoPlayer", "~> 0.1.1"
pod 'CocoaLumberjack', '~> 1.7.0'
pod 'VKFoundation', '0.1.1'
pod 'CocoaHTTPServer'
target 'VKVideoPlayerTests' do
pod 'Specta', '~> 0.2.1'
pod 'Expecta', '~> 0.3.0'
pod 'OCMock', '~> 2.2.1'
pod "VKVideoPlayer", "~> 0.1.1"
pod 'CocoaHTTPServer'
end
# Remove 64-bit build architecture from Pods targets
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD_32_BIT)'
end
end
end
vim 命令集
i 插入
:wq 保存并退出
ZZ 保存并退出
:q! 强制退出并忽略所有更改
:e! 放弃所有修改,并打开原来文件。
- 安装cocoapods
- CocoaPods安装
- cocoapods安装
- CocoaPods安装
- cocoaPods安装
- 安装cocoaPods
- cocoapods 安装
- 安装CocoaPods
- CocoaPods安装
- cocoapods 安装
- CocoaPods安装
- Cocoapods 安装
- CocoaPods安装
- Cocoapods安装
- cocoapods安装
- cocoapods 安装
- 安装cocoapods
- 安装cocoapods
- Java 单例模式
- 【UI】【View】自定义布局方法与注意事项(一)
- C++中const用法总结
- uva536 Tree Recovery
- 单片机准双向口IO详解
- cocoapods 安装
- AMD规范
- 公共函数库的介绍与使用
- Animation动画详解(八)——PropertyValuesHolder与Keyframe
- .NET 4 协变和逆变理解
- HTML5 postMessage解决跨域、跨iframe窗口消息传递
- 关联其它表进行update数据
- ROM
- Dynamics CRM2013 从subgrid中打开快速创建窗体创建数据