Could not automatically select an Xcode project

时间:2015-07-15 12:46:55   收藏:0   阅读:104

当把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 ‘Portfolio/Portfolio.xcodeproj‘   
  3. ......  

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

 

当在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即可。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!