来源: http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

 

1.

当把CocoaPods生成的workspace移动到上层目录时,需要改下Pods.xcconfig和工程里的一些设置,就通常没什么难度。

当遇到这个问题时:

 

  1. Could not automatically select an Xcode project. Specify one in your Podfile like so:  
  2.   
  3. xcodeproj 'path/to/Project.xcodeproj'  

 

在Podfile文件里指定下工程目录就行了,比如我在Podfile文件添加这行就行了:

 

  1. ......  
  2. xcodeproj 'MessageNews/MessageNews.xcodeproj'   
  3. ......  

主要是让Pod找到子目录中的工程文件。

 

2.

当在update或install时遇到这个问题:

 

  1. Unable to find a specification for `xxxxx (~> 1.x.x)` depended upon by Podfile.  

只需要把当前Pod的目录清理一下就行了。在终端执行以下命令:

 

 

  1. pod repo remove master  
  2. pod setup  

setup成功后执行install或update即可。

 

3.

出现以下错误时:"

[!] Oh no, an error occurred.

 

It appears to have originated from your Podfile at line 1.

 

Search for existing github issues similar to yours:

https://github.com/CocoaPods/CocoaPods/search?q=%2FUsers%2Fhuaqiao%2FDesktop%2FUserCommand1%2FPodfile%3A1%3A+syntax+error%2C+unexpected+%27%3A%27%2C+expecting+end-of-input%0Aplatform+%3A+ios+%0A++++++++++%5E&type=Issues

 

If none exists, create a ticket, with the template displayed above, on:

https://github.com/CocoaPods/CocoaPods/issues/new

 

Be sure to first read the contributing guide for details on how to properly submit a ticket:

https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

 "

 解决方案:   You need reinstall cocoapods: so

sudo gem uninstall cocoapods
sudo gem install cocoapods
pod setup



4.
“[!] The platform of the target `Pods` (iOS 6.0) is not compatible with XXX which has a minimum requirement of iOS 6.0 - OS X 10.7.”

可以修改Podfile为:
platform :ios, '6.0'