为什么我无法运行“pod update”?

时间:2014-02-01 19:52:29

标签: ios objective-c cocoapods

每当我尝试在项目文件夹中运行pod update时,都会收到以下错误:

### Stack

```
   CocoaPods : 0.29.0
        Ruby : ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
    RubyGems : 2.0.3
        Host : Mac OS X 10.9.1 (13B3116)
       Xcode : 5.0.2 (5A3005)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 56f3f79d03ef66e11abefc7c634b3bcdd6426577
```

### Podfile

```ruby
platform :ios, '7.0'

pod 'RedditKit', '~> 1.0'
pod 'UIView+AutoLayout'
pod 'GPUImage'
```

### Error

```
TypeError - Plist contains a hash value object type unsupported by Xcodeproj.
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.14.1/lib/xcodeproj/project.rb:172:in `read_plist'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.14.1/lib/xcodeproj/project.rb:172:in `initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.14.1/lib/xcodeproj/project.rb:93:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer/analyzer.rb:489:in `block in compute_target_platforms'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer/analyzer.rb:486:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer/analyzer.rb:486:in `compute_target_platforms'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer/analyzer.rb:55:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:171:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:94:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:52:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:93:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:86:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:38:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:82:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:213:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
```

我究竟会如何解决此问题?据我所知,除了更改我的podfile以包含另一个库之外,我没有触及Cocoapods相关的任何内容。

我试过这个:https://github.com/CocoaPods/Xcodeproj/issues/119但它不起作用。我复制了它,删除了原文,然后重命名了副本,它仍然失败了。

在第一行中,它提到了一个文件,这里是它引用的行:

172       plist = Xcodeproj.read_plist(pbxproj_path.to_s)

2 个答案:

答案 0 :(得分:4)

尝试进行构建设置并将Build Active Architecture Only更改为NO。我有类似的问题,这对我有用。

如果您的项目要求Build Active Architecture Only设置为YES,那么如果您将值更改为NO,清理并构建,然后将其设置回YES,它也会有效}。

答案 1 :(得分:0)

我不确定,但我希望通过将ProjectName / ProjectName-Info.plist文件移动到ProjectName / ProjectName-Info.plist.bac,然后运行pod install来修复它。

恢复ProjectName-Info.plist后。一切似乎都按预期工作。