美文网首页ios开发
Pod 常见问题解决

Pod 常见问题解决

作者: Altitude2015 | 来源:发表于2018-09-05 17:27 被阅读0次

    1,pod repo 切换源

    pod repo remove master
    pod repo add master https://gitcafe.com/akuandev/Specs.git
    pod repo update
    目前搜集到的可选源有 https://gitcafe.com/akuandev/Specs.git http://git.oschina.net/akuandev/Specs.git https://git.coding.net/hging/Specs.git (实际上就是几个常见的git托管站都有哈哈哈哈) 假如打开Podfile,我们可以看到这么一条 source 'https://github.com/CocoaPods/Specs.git'将这个也换为刚刚repo使用的源,否则依然会从Github上面clone东西
    最后,完成了上述两处地方更改之后,就可以直接使用

    pod install
    pod update

    2,pod清空本地缓存

    pod cache clean --all # will clean all pods
    pod cache clean 'FortifySec' --all # will remove all installed 'FortifySec' pods

    重置pod

    1. rm -rf ~/Library/Caches/CocoaPods
    2. rm -rf Pods
    3. rm -rf ~/Library/Developer/Xcode/DerivedData/*
    4. pod deintegrate
    5. pod setup
    6. pod install

    3,pod清空本地搜索搜不到问题

    1.执行pod setup (完成后再搜索还搜索不到执行第二步)
    2.删除~/Library/Caches/CocoaPods目录下的search_index.json文件(手动删除或 终端输入:rm ~/Library/Caches/CocoaPods/search_index.json
    3.执行pod search(就可以啦)

    4,pod install 时遇到

    Unable to find a specification for 三方类名 排查问题

    排查问题顺序
    1,cocoaPods是否安装完成,执行 ls | grep PLMedia*,若为空则需重新 update CocoaPods 把 ~/.cocoapods 目录删除,重新执行 pod setup
    2,cocoaPods是否有该第三方库。
    3,确定有该库后查看库版本号是否匹配可用。
    4,查看库支持的iOS 系统版本。

    1, pod deintegrate清除项目cocoaPods
    2,pod install
    3,pod update

    5,gem换源

    gem sources --remove https://rubygems.org/
    gem sources -a http://ruby.taobao.org/ (https://gems.ruby-china.com) 最新切维护中
    gem sources -l

    相关文章

      网友评论

        本文标题:Pod 常见问题解决

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