运行 pod 安装后无法找到任何 Pods 的规范

Unable to find a specification for any Pods after running pod setup

对于我尝试安装的每个 pod,我都收到“无法找到规范”错误。

这是我的播客文件:

source 'https://github.com/yannickl/QRCodeReader.swift.git'
source 'https://github.com/aschuch/QRCode.git'

platform :ios, '8.0'

pod 'QRCode', '0.2'
pod 'QRCodeReader.swift', '~> 4.3.0'

在对 Podfile 进行各种更改后进行了几次测试后,我有 运行:

sudo rm -fr ~/.cocoapods/repos/master
pod setup

然而这并没有解决问题。我是 运行ning El Capitan / XCode 7. 还有其他人 运行ning 遇到类似的问题吗?

我会用 CocoaPods 规范替换源代码,因为这两个依赖项都已添加到主规范库中。

source 'https://github.com/CocoaPods/Specs.git'

您还需要添加 use_frameworks!,因为您的一个播客是用 swift 编写的。

参考这个:https://github.com/yannickl/QRCodeReader.swift

因此您的播客文件将如下所示

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

use_frameworks!

pod 'QRCode', '0.2'
pod 'QRCodeReader.swift', '~> 4.3.0'