cocoapods 常见错误

使用cocoapods时常见错误

这些错误基本cocoapods升级版本到1.0.0所造成的

错误1、

当写在Podfile文件中的第三方框架,不能使用,找不到时

查看Pods文件夹,是否下载了所需要的第三方框架,没有的话就 pod update

错误2、

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

在Podfile文件里指定下工程目录就行了

xcodeproj 'Demo/Demo.xcodeproj'

但是如果cocoapods版本为(1.0.0)的话,可能会有以下警告

[!] xcodeproj was renamed to `project`. Please use that from now on.

这时只需要把xcodeproj改为 project就行了

project 'Demo/Demo.project'

错误3、

The dependency `AFNetworking (~> 3.0)` is not used in any concrete target.

在Podfile中添加

target 'MyApp' do

(myAPP)换成你自己的工程名就好了

错误4、

[!] Invalid `Podfile` file: syntax error, unexpected end-of-input, expecting keyword_end.

在Podfile的末尾添加 end

错误5、

Unable to find the Xcode project `/Volumes/BIAO/iOS/code/MBWB.xcodeproj` for the target `Pods`.

在Podfile中 将  project 'Demo/Demo.project’  改成  project 'Demo.project'

错误6、

build diff: /../Podfile.lock: No such file or directory

在工程设置中的Build Phases下删除Check Pods Manifest.lock及Copy Pods Resources


如果提示Permission denied @ rb_sysopen - /Users/John_LS/.gemrc这个错误,那说明没有权限。

原因:我已经更新了我的rubygem像这样的gem update --syste,但是,只有我当地的gems被更新。由于gem: --user-install安装限制在我的/etc/.gemrc。当工作时,它使用全局rubygem与我无关。

解决方法:要解决这个问题,我更新了全局的RubyGems:sudo gem update --system --no-user-install.。


cocopods 搜索

pod search json

你可能感兴趣的:(cocoapods 常见错误)