• 一个cocoapods问题的解决,希望能帮助到遇到相似情况的人


    之前10.7的系统上执行过cocoapods没有问题。如今系统版本号升级到了10.9,尝试使用cocoapods遇到问题,报告了类似以下的错误:
    
    Psych::SyntaxError - (/Users/psteinacher/.cocoapods/repos/master/CocoaPods-version.yml): mapping values are not allowed in this context at line 3 column 4
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:153:in `parse'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:129:in `load'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `block in load_file'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `open'
    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `load_file'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/lib/cocoapods/sources_manager.rb:248:in `version_information'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/lib/cocoapods/sources_manager.rb:209:in `repo_compatible?'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/lib/cocoapods/sources_manager.rb:268:in `master_repo_functional?'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/lib/cocoapods/command.rb:40:in `parse'
    /Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:179:in `parse'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/lib/cocoapods/command.rb:39:in `parse'
    /Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:211:in `run'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.28.0/bin/pod:24:in `<top (required)>'
    
    经过多方尝试,发现运行例如以下的命令能够解决这个问题:
    
    $ sudo rm -fr ~/.cocoapods/repos/master
    $ pod setup
    
    最后推荐一个xcode插件,能够非常方便的使用cocoapods。
    
    CocoaPods for Xcode
    非常方便的Xcode pods插件。能够非常方便的在Xcode通过pods安装各种objective-c第三方库,省去曾经还要手动去跑pods命令行的麻烦;此外,还支持通过cocoaDocs来安装库文档。唯一的遗憾是,它眼下仅仅支持Xcode5,4版本号还用不了。
    项目地址:https://github.com/kattrali/cocoapods-xcode-plugin
    
    Enjoy it!
    

  • 相关阅读:
    存储过程的语法
    C#之理解接口的作用
    获取gridview模板列里面的控件的ID
    asp.net asp:Repeater嵌套绑定方法(2)
    asp.net asp:Repeater嵌套绑定方法(1)
    listview 绑定hashtable 以及值的显示
    mark
    程序员的路该怎么样继续走下去?
    多条件查询以及分页存储过程(倒叙和顺序查询)
    发生ActionScript 错误:[RPC Fault faultString="发送失败" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed
  • 原文地址:https://www.cnblogs.com/hrhguanli/p/3892833.html
Copyright © 2020-2023  润新知