1、去除CocoaPods相关库警告
- 去除所有警告,在platform :ios, ‘x.0’ 的后面加入这句:
inhibit_all_warnings!
- 对单个消除警告:
pod 'MJExtension','~>3.0.15.1',:inhibit_warnings => true
2、[!] Unable to find a pod with name, author, summary, or description matching xxx.
- 解决办法:
删除~/Library/Caches/CocoaPods目录下的search_index.json文件
rm ~/Library/Caches/CocoaPods/search_index.json
3、[!] CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/2/e/7/YTKNetworkExtension/0.1.0/YTKNetworkExtension.podspec.json, error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)
-
问题原因:
CocoaPods 1.8+将CDN切换为默认的spec repo源,并附带一些增强功能!CDN支持最初是在1.7版本中引入的,最终在1.7.2中完成。 它旨在大大加快初始设置和依赖性分析。 -
解决办法:
- podfile文件中添加source源:
source 'https://github.com/CocoaPods/Specs.git
- 移除
trunk
pod repo remove trunk
4、 pod install 时出现xxxxx does not specify a Swift version and none of the targets (Pods) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod
解决办法:
在podfile文件添加use_frameworks!
target ‘Project_xx’ do
use_frameworks!
end
5、升级Mac OS之后执行pod命令出现Failed to extract git version from git --version ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n") (RuntimeError)
解决办法:重装xcode command line:
xcode-select --install
如果没有解决问题,执行以下命令
sudo xcode-select -switch /
6、pod install时出现error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
错误
解决办法:
git config --global http.postBuffer 524288000
网友评论