美文网首页
CocoaPods的相关操作

CocoaPods的相关操作

作者: McDuff | 来源:发表于2016-12-26 11:08 被阅读13次

    CocoaPods升级

    sudo gem install cocoapods --pre
    

    如果出现 错误:

    ERROR: While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cocoapods requires molinillo
    

    则需要更新 gem 运行一下命令

    sudo gem update --system
    

    如果出现 错误:

    ERROR: While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/xcodeproj
    

    则需要

    sudo gem install -n /usr/local/bin cocoapods --pre
    

    查看Pods中已过期的第三方开源库:

    pod outdated
    

    在 Mac 上用 SourceTree 克隆, 出现了 warning: templates not found /usr/local/git/share/git-core/templates 警告,导致克隆失败的解决办法:

    /// 创建目录
    sudo mkdir -p /usr/local/git/share/git-core/templates
    /// 给修改目录添加权限
    sudo chmod -R 755 /usr/local/git/share/git-core/templates
    

    pod install后出现一下警告时的处理方式:

    [!] `<PBXResourcesBuildPhase UUID=`xxx`>` attempted to initialize an object with an unknown UUID. `0B6359431C33CA0200C80C5D` for attribute: `files`. This can be the result of a merge and  the unknown UUID is being discarded.
    

    解决方法:
    1.移除General->Linked Frameworks and libraries中的libPods.a
    2.退出xcode
    3.在终端重新pod install即可

    菜鸟笔记!

    相关文章

      网友评论

          本文标题:CocoaPods的相关操作

          本文链接:https://www.haomeiwen.com/subject/tymblttx.html