关于Cocoapods升级CDN问题

227 阅读1分钟

关于cocoapods更新之后报 CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/5/0/9/FBSnapshotTestCase/2.1.3/FBSnapshotTestCase.podspec.json Response: Couldn't connect to server

网上找到了一个大神的解决办法,方便下次使用,在此记录

解决办法 1

  • 修改hosts 添加

  • hosts 文件路径:/etc/hosts

    199.232.4.133 raw.githubusercontent.com 
    

解决办法 2

  • Podfile文件添加清华镜像

    source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
    

参考资料