美文网首页iOS点点滴滴iOS学习笔记
使用Xcode的CocoaPods插件报错的问题

使用Xcode的CocoaPods插件报错的问题

作者: 龙之天下 | 来源:发表于2016-03-31 15:03 被阅读110次

使用Xcode的CocoaPods插件报错的问题

1.打开插件CocoaPods

方法:

顶部菜单栏 -点击Product,弹出列表如下:


2.创建PodFile,如下图

3.选中Create/Edit Podfile并点击,会弹出如下图

4.编辑Podfile,你所需要的三方框架,编辑完成后,com+S保存,然后关闭此编辑页面。

5.安装三方框架

选中如上图所示;点击Upadate Pods(office only)不会更新仓库;如果需要更新,点击Upadate Pods

如果出现如下错误信息。是因为你的GEM_PATH的路径错误

解决的方案:如下

在终端输入一下命令:

$ which pod

会输出一下结果:

/Users/XXX/.rvm/rubies/ruby-2.0.0-p643/bin/pod

那么,你的GEM_PATH的路径:/Users/XXX/.rvm/rubies/ruby-2.0.0-p643/bin

6.将新路径添加到如下图所示:然后重新做第5步的操作

7.以上操作都正确,你工程会打印如下的结果:

GEM_PATH的路径/pod update --no-repo-update

Update all pods

Analyzing dependencies

Downloading dependencies

Installing AFNetworking (3.0.4)

Installing SDWebImage (3.7.5)

Installing SVProgressHUD (1.1.3)

Generating Pods project

Integrating client project

[!] Please close any current Xcode sessions and use `XXX.xcworkspace` for this project from now on.

Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.

相关文章

网友评论

    本文标题:使用Xcode的CocoaPods插件报错的问题

    本文链接:https://www.haomeiwen.com/subject/acbelttx.html