使用CocoaPods遇到的几个坑,记录一下
2016-07-22 16:42
507 查看
最近使用pod的时候升级到1.0.0版本后遇到一些坑,整理一下
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /Applications/Cocos/tools/ant/bin in PATH, mode 040777 Re-creating CocoaPods due to major version update. Updating
local specs repositories Analyzing dependencies
[!] The dependency `ReactiveCocoa (= 2.1.8)` is not used in any concrete target.
The dependency `objectiveflickr (= 2.0.4)` is not used in any concrete target.
The dependency `LinqToObjectiveC (= 2.0.0)` is not used in any concrete target.
The dependency `SDWebImage (= 3.6)` is not used in any concrete target.
查了查好像是配置podfile文件的问题
作如下修改
这样再运行pod install,就会成功了。
原因是podfile升级到最新版本,pod里的内容必须明确指出所用第三方库的target
遇到这个问题时,首先打算的是重新安装,结果又遇到坑,发现报错如下:
ERROR: Could not find a valid gem 'cocospods’ (>= 0), here is why:
Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)
查了查发现需要将http 替换成 https
作如下修改:
1.gem sources --remove http://ruby.taobao.org/
2.gem sources -a https://ruby.taobao.org/
3.查看源对不对
gem sources -l
4.再安装就好了
sudo
gem install cocoapods
然后又遇到坑,报这个错:
安装成功之后又遇到问题了
[/code]由于我一直使用的是 pod update --verbose --no-repo-update 和 pod install --verbose --no-repo-update 这两条指令,
所以会忽略升级CocoaPods的spec仓库
然后我又去 pod install 和 pod update 了下终于能用了。
[/code]
首先是CocoaPods报错:The dependency `` is not used in any concrete target
错误内容/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /Applications/Cocos/tools/ant/bin in PATH, mode 040777 Re-creating CocoaPods due to major version update. Updating
local specs repositories Analyzing dependencies
[!] The dependency `ReactiveCocoa (= 2.1.8)` is not used in any concrete target.
The dependency `objectiveflickr (= 2.0.4)` is not used in any concrete target.
The dependency `LinqToObjectiveC (= 2.0.0)` is not used in any concrete target.
The dependency `SDWebImage (= 3.6)` is not used in any concrete target.
查了查好像是配置podfile文件的问题
作如下修改
platform :ios, ‘7.0‘ target "RWTFlickrSearch" do pod ‘ReactiveCocoa‘, ‘2.1.8‘ pod ‘objectiveflickr‘, ‘2.0.4‘ pod ‘LinqToObjectiveC‘, ‘2.0.0‘ pod ‘SDWebImage‘, ‘3.6‘ end
这样再运行pod install,就会成功了。
原因是podfile升级到最新版本,pod里的内容必须明确指出所用第三方库的target
遇到这个问题时,首先打算的是重新安装,结果又遇到坑,发现报错如下:
ERROR: Could not find a valid gem 'cocospods’ (>= 0), here is why:
Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)
查了查发现需要将http 替换成 https
作如下修改:
1.gem sources --remove http://ruby.taobao.org/
2.gem sources -a https://ruby.taobao.org/
3.查看源对不对
gem sources -l
4.再安装就好了
sudo
gem install cocoapods
然后又遇到坑,报这个错:
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/xcodeproj 后来使用这个指令解决了 sudo gem install -n /usr/local/bin cocoapods
期间还卸载重新安装了下使用如下指令sudo gem install cocoapods -v 0.39.01.卸载cocoapods$ sudo gem uninstall cocoapods
2. 安装xcodeproj$ sudo gem install xcodeproj
3. 安装指定版本的Cocoapods[code]$
安装成功之后又遇到问题了
[/code]由于我一直使用的是 pod update --verbose --no-repo-update 和 pod install --verbose --no-repo-update 这两条指令,
所以会忽略升级CocoaPods的spec仓库
然后我又去 pod install 和 pod update 了下终于能用了。
[/code]
相关文章推荐
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 不可修补的 iOS 漏洞可能导致 iPhone 4s 到 iPhone X 永久越狱
- iOS 12.4 系统遭黑客破解,漏洞危及数百万用户
- 每日安全资讯:NSO,一家专业入侵 iPhone 的神秘公司
- [转][源代码]Comex公布JailbreakMe 3.0源代码
- 讲解iOS开发中基本的定位功能实现
- iOS中定位当前位置坐标及转换为火星坐标的方法
- js判断客户端是iOS还是Android等移动终端的方法
- iOS应用开发中AFNetworking库的常用HTTP操作方法小结
- iOS应用中UISearchDisplayController搜索效果的用法
- iOS App开发中的UISegmentedControl分段组件用法总结
- IOS开发环境windows化攻略
- iOS应用中UITableView左滑自定义选项及批量删除的实现
- iOS中UIAlertView警告框组件的使用教程
- 浅析iOS应用开发中线程间的通信与线程安全问题
- iOS中的UIKeyboard键盘视图使用方法小结
- 检测iOS设备是否越狱的方法
- .net平台推送ios消息的实现方法