CocoaPods的相关操作

2016-12-26  本文已影响13人  McDuff

CocoaPods升级

sudo gem install cocoapods --pre

如果出现 错误:

ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: cocoapods requires molinillo

则需要更新 gem 运行一下命令

sudo gem update --system

如果出现 错误:

ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj

则需要

sudo gem install -n /usr/local/bin cocoapods --pre

查看Pods中已过期的第三方开源库:

pod outdated

在 Mac 上用 SourceTree 克隆, 出现了 warning: templates not found /usr/local/git/share/git-core/templates 警告,导致克隆失败的解决办法:

/// 创建目录
sudo mkdir -p /usr/local/git/share/git-core/templates
/// 给修改目录添加权限
sudo chmod -R 755 /usr/local/git/share/git-core/templates

pod install后出现一下警告时的处理方式:

[!] `<PBXResourcesBuildPhase UUID=`xxx`>` attempted to initialize an object with an unknown UUID. `0B6359431C33CA0200C80C5D` for attribute: `files`. This can be the result of a merge and  the unknown UUID is being discarded.

解决方法:
1.移除General->Linked Frameworks and libraries中的libPods.a
2.退出xcode
3.在终端重新pod install即可

菜鸟笔记!

上一篇 下一篇

猜你喜欢

热点阅读