Updating to latest version of CocoaPods?

前端 未结 12 1911
误落风尘
误落风尘 2020-12-07 07:46

I\'m having some issues installing Alamofire 4.0 into my project.

I\'ve got the latest version of Xcode, running Swift 3

12条回答
  •  感动是毒
    2020-12-07 08:21

    If you got System Integrity Protection enabled or any other permission write error, which is enabled by default since macOS Sierra release, you should update CocoaPods, running this line in terminal:

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

    After installing, check your pod version:

    pod --version
    

    You will get rid of this error:

    ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/bin directory
    

    And it will install latest CocoaPods:

    Successfully installed cocoapods-x.x.x
    Parsing documentation for cocoapods-x.x.x
    Installing ri documentation for cocoapods-x.x.x
    Done installing documentation for cocoapods after 4 seconds
    1 gem installed
    

提交回复
热议问题