美文网首页
CocoaPods镜像源 解决RN项目初始下载崩的问题

CocoaPods镜像源 解决RN项目初始下载崩的问题

作者: AizawaSayo | 来源:发表于2020-11-04 16:40 被阅读0次

    新版的 CocoaPods 已经不允许用pod repo add直接添加master库了,但是依然可以:
    1. 先移除

    cd ~/.cocoapods/repos 
    pod repo remove master
    

    2. 再更换:
    (1) 码云(持续更新,每日同步一次)
    亲测好用,目前用的是这个,其他备用

    git clone https://gitee.com/mirrors/CocoaPods-Specs.git master
    

    (2) 腾讯云(也蛮快的)

    git clone https://mirrors.cloud.tencent.com/CocoaPods/Specs.git
    

    (3) 清华大学源

    git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
    

    (4) 北京外国语大学

    git clone https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git master
    

    (5) gitclub

    git clone https://gitclub.cn/CocoaPods/Specs.git master
    

    3. 最后进入自己的工程,在自己工程的podFile第一行加上:

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

    相关文章

      网友评论

          本文标题:CocoaPods镜像源 解决RN项目初始下载崩的问题

          本文链接:https://www.haomeiwen.com/subject/giegvktx.html