1
Error:
pod search Masonry
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/user_interface/error_report.rb:135:in `error_from_podfile': invalid byte sequence in UTF-8 (ArgumentError)
from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/user_interface/error_report.rb:41:in `report'
from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/command.rb:66:in `report_error'
from /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:396:in `handle_exception'
from /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:337:in `rescue in run'
from /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `run'
from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/lib/cocoapods/command.rb:52:in `run'
from /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.4.0.beta.2/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
Solution:
https://github.com/CocoaPods/CocoaPods/issues/5338
我按照里面的描述,删除了~/Library/Caches/CocoaPods/search_index.json
文件,pod search
奇迹般的可以了。
其中也大概提到出现这个问题的原因,可能是CocoaPods在创建索引时,我们ctrl+c
取消了这个操作,这导致索引生成的某些字符有问题,所以我们删除索引文件,重新生成即可。
2
cocoaPods导入第三方库,但头文件却显示没有发现 嘗試pod install後,Product -> Clear Build Folder (按住option鍵) 清理一下,然後重新Build一次
3
CDN: Repo trunk does not exist!
解决方案:
https://github.com/CocoaPods/CocoaPods/issues/9338
rm -rf ~/.cocoapods/repos