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

今天升级了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  _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


Cocoapods解决Search不到新版本的问题_第1张图片
5788863D03B806C7D74085B711DD50FE.jpg

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

接着继续尝试

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

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


Cocoapods解决Search不到新版本的问题_第2张图片
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不到新版本的问题)