[Pod] Invalid string representation for a specification

一.前言

使用最新的Cocoapods 1.10.1遇到了一个奇怪的问题

[!] Invalid string representation for a specification: WebViewJavascriptBridge(WK) (6.1.0). The string representation should include the name and optionally the version of the Pod.

可能是由于这个库命名写的不太规范 把pods给搞坏了 在网上找了找解决方案发现并没有 所以这里写个文章记录一下

二.解决方案

首先搜索pods缓存

pod cache list

WebViewJavascriptBridge(WK):
  - Version: 6.1.0
    Type:    Release
    Spec:    /Users/objcat/Library/Caches/CocoaPods/Pods/Specs/Release/WebViewJavascriptBridge(WK)/6.1.podspec.json
    Pod:     /Users/objcat/Library/Caches/CocoaPods/Pods/Release/WebViewJavascriptBridge(WK)/6.1.0-3a21a

WebViewJavascriptBridge(WK) 把这个文件夹删除即可 如果你搜索到的不是你要找的库 也可以直接跳到缓存目录自己寻找

finally enjoy it.

by objcat

2021.08.04

你可能感兴趣的:([Pod] Invalid string representation for a specification)