OS X 10.12上安装CocoaPods

OS X 10.12上安装CocoaPods

➜  Desktop  sudo gem install cocoapods
Fetching: claide-1.0.1.gem (100%)
Successfully installed claide-1.0.1
Fetching: nap-1.1.0.gem (100%)
Successfully installed nap-1.1.0
Fetching: cocoapods-core-1.2.1.gem (100%)
Successfully installed cocoapods-core-1.2.1
Fetching: cocoapods-deintegrate-1.0.1.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.1
Fetching: cocoapods-downloader-1.1.3.gem (100%)
Successfully installed cocoapods-downloader-1.1.3
Fetching: cocoapods-plugins-1.0.0.gem (100%)
Successfully installed cocoapods-plugins-1.0.0
Fetching: cocoapods-search-1.0.0.gem (100%)
Successfully installed cocoapods-search-1.0.0
Fetching: cocoapods-stats-1.0.0.gem (100%)
Successfully installed cocoapods-stats-1.0.0
Fetching: cocoapods-trunk-1.2.0.gem (100%)
Successfully installed cocoapods-trunk-1.2.0
Fetching: cocoapods-try-1.1.0.gem (100%)
Successfully installed cocoapods-try-1.1.0
Fetching: colored2-3.1.2.gem (100%)
Successfully installed colored2-3.1.2
Fetching: fourflusher-2.0.1.gem (100%)
Successfully installed fourflusher-2.0.1
Fetching: gh_inspector-1.0.3.gem (100%)
Successfully installed gh_inspector-1.0.3
Fetching: molinillo-0.5.7.gem (100%)
Successfully installed molinillo-0.5.7
Fetching: ruby-macho-1.1.0.gem (100%)
Successfully installed ruby-macho-1.1.0
Fetching: CFPropertyList-2.3.5.gem (100%)
Successfully installed CFPropertyList-2.3.5
Fetching: nanaimo-0.2.3.gem (100%)
Successfully installed nanaimo-0.2.3
Fetching: xcodeproj-1.4.4.gem (100%)
ERROR:  While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
➜  Desktop  gem sources -l

➜  Desktop  gem sources --remove https://gems.ruby-china.org/
https://gems.ruby-china.org/ removed from sources
➜  Desktop  gem sources -l                                   

➜  Desktop  sudo gem install cocoapods
ERROR:  While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
➜  Desktop  sudo gem install -n /usr/local/bin cocoapods
Successfully installed xcodeproj-1.4.4
Fetching: cocoapods-1.2.1.gem (100%)
Successfully installed cocoapods-1.2.1
Parsing documentation for xcodeproj-1.4.4
Installing ri documentation for xcodeproj-1.4.4
Parsing documentation for cocoapods-1.2.1
Installing ri documentation for cocoapods-1.2.1
2 gems installed
➜  Desktop  pod --version

问题:Specs satisfying the NIMKit dependency were found, but they required a higher minimum deployment target.

解决办法:在Podfile中 加入 platform :ios, ‘8.0’

pod search ‘nimsdk’ 不到最新的版本,执行 pod repo update 就可以了

Loading Disqus comments...
Table of Contents