美文网首页
Cocoapods解决Search不到新版本的问题

Cocoapods解决Search不到新版本的问题

作者: 嗷大喵 | 来源:发表于2020-09-17 15:51 被阅读0次

    今天升级了Xcode 12编译项目发现失败了,看了下编译日志

    Incompatible block pointer types sending 'PINMemoryCacheObjectBlock  _Nullable __strong' (aka 'void (^__strong)(PINMemoryCache * _Nonnull __strong, NSString * _Nonnull __strong, id  _Nullable __strong)') to parameter of type 'PINCacheObjectBlock _Nullable' (aka 'void (^)(id<PINCaching>  _Nonnull __strong, NSString * _Nonnull __strong, id  _Nullable __strong)')
    

    发现是PINCache和PINRemoteImage导致编译失败,搜了下自己的Podfile文件发现没有这2个库

    打开Podfile.lock寻找一下这2个库,发现是Texture依赖了这2个库,先更新下Texture到3.0.0

    继续一编译发现还是报错,还是那2个库报错

    继续看了下Podfile.lock发现PINCache和PINRemoteImage都是一个beta的版本,去github的主页上搜了下这2个库,看见作者已经修复了Xcode12编译上的报错问题。

    然后

    pod search PINRemoteImage
    

    发现我搜的版本是3.0.0 不是github上3.0.1


    5788863D03B806C7D74085B711DD50FE.jpg

    我尝试删除了~/Library/Caches/CocoaPods/search_index.json
    再去search。search的索引在重建,但是发现还是3.0.0

    接着继续尝试

    cd ~/.cocoapods/repos/master
    pod repo update master
    

    等待结束以后,再search。终于版本更新了


    image.png

    另外再强制指定版本

    pod 'PINRemoteImage', :git => 'https://github.com/pinterest/PINRemoteImage.git' , :tag => '3.0.1'
    pod 'PINCache', :git => 'https://github.com/pinterest/PINCache.git' , :tag => '3.0.1'
    

    相关文章

      网友评论

          本文标题:Cocoapods解决Search不到新版本的问题

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