当前位置:网站首页>cocoapods的安装和使用
cocoapods的安装和使用
2022-07-26 09:22:00 【~轻舟~】
今天在安装cocoapods的时候出现的情况:
首先安装cocoapods执行命令行:sudo gem install cocoapods
会出现这个错误:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2) (https://rubygems.org/quick/Marshal.4.8/cocoapods-0.37.1.gemspec.rz)
ERROR: Possible alternatives: cocoapods这是因为service被墙了,要换一个sources:
gem sources --remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/
gem sources -l如果打印出来的东西是:
http://ruby.taobao.org那么再执行安装cocoapods命令:
sudo gem install cocoapods然后你就会看到安装进程了,那么接下来就恭喜你完成了!!!
接下来新建一个项目QZProject
$ cd xxxxxxxxxxxx为项目目录,直接将项目拖到终端就行
新建Podfile文件
$ vim Podfile输入i进入编辑状态,目前高版本Podfie这样编写
$ platform: ios,'8.0'
$ target 'QZProject' do
$ pod 'SDAutoLayout'
$ end完成后敲esc然后:wq(保存并退出)
最后
$ pod install完成
当遇到一下问题时: 
可以这样解决:
在Podfile文件中加上:
use_frameworks!即可!!!
持续更新
边栏推荐
- “No input file specified “问题的处理
- Canal 的学习笔记
- Li Mu D2L (VI) -- model selection
- 字节缓冲流&字符流详解
- Pat grade a a1076 forwards on Weibo
- 2022 mobile crane driver test question simulation test question bank simulation test platform operation
- Byte buffer stream & character stream explanation
- Apple generated and verified tokens for PHP
- arcgis的基本使用4
- When you click input, the border is not displayed!
猜你喜欢

arc-gis基础操作3

李沐d2l(五)---多层感知机

Qtcreator reports an error: you need to set an executable in the custom run configuration

Redis principle and usage - installation and distributed configuration
![[MySQL] how to execute an SQL statement (2)](/img/7b/53f8756458cc318e2f417b1cc0c3f8.png)
[MySQL] how to execute an SQL statement (2)

【线上死锁分析】由index_merge引发的死锁事件

【线上问题】Timeout waiting for connection from pool 问题排查

服务器内存故障预测居然可以这样做!

Object 的Wait Notify NotifyAll 源码解析

Zipkin installation and use
随机推荐
CF1481C Fence Painting
volatile 靠的是MESI协议解决可见性问题?(下)
Windows通过命令备份数据库到本地
分布式跟踪系统选型与实践
堆外内存的使用
838. Heap sorting
Selection and practice of distributed tracking system
围棋智能机器人阿法狗,阿尔法狗机器人围棋
【线上问题】Timeout waiting for connection from pool 问题排查
Announcement | FISCO bcos v3.0-rc4 is released, and the new Max version can support massive transactions on the chain
Basic use of ArcGIS 1
多项式开根
Exception handling mechanism II
Two tips for pycharm to open multiple projects
Voice chat app source code - Nath live broadcast system source code
NTT(快速数论变换)多项式求逆 一千五百字解析
Order based evaluation index (especially for recommendation system and multi label learning)
暑假末尾学习笔记
Qt | 关于如何使用事件过滤器 eventFilter
Vertical search