最近手上的几个iOS项目pod install陆续出现这这个问题,用这个方式解决屡试不爽!
原因CocoaPod 的source从cdn.cocoapods.org切换到cdn.jsdelivr.net 导致无法更新依赖
错误描述日志如下 :
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/5/1/0/Toast/2.1/Toast.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/5/1/0/Toast/2.1/Toast.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/5/1/0/Toast/2.2/Toast.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/5/1/0/Toast/2.2/Toast.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/5/1/0/Toast/2.4/Toast.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/5/1/0/Toast/2.4/Toast.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/5/1/0/Toast/3.0/Toast.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/5/1/0/Toast/3.0/Toast.podspec.json
在Podfile中 更改source即可
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
网友评论