pod install 时,报
[!] CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/1/f/6/SnapKit/5.6.0/
浏览器里输入https://cdn.jsdelivr.net回车,的确是连接不上,所以肯定报错。
cocoapods 默认走CDN,从trunk这个源下面去更新,但是CDN又不通,所以导致无法更新。
看了下项目里指定的源是 source 'https://cdn.cocoapods.org/'
如果项目里指定源为 https://cdn.cocoapods.org/ ,那么得先保证CDN能通,否则肯定报错。
如果不能走CDN的话,将源设置成 https://github.com/CocoaPods/Specs.git 也可以。即在Podfile 里设置 source 'https://github.com/CocoaPods/Specs.git'
之后删除trunk目录再pod install
如上图,已删除了trunk文件