使用CocoaPods过程中的几个问题

来源:互联网 发布:留学生落户360天算法 编辑:程序博客网 时间:2024/06/07 07:53

原文链接 _ 感谢作者_http://blog.csdn.net/zhangao0086/article/details/39703083

使用CocoaPods过程中的几个问题

当把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 0
原创粉丝点击