找不到“ActionCableClient”的 podspec。 Pod 安装问题

No podspec found for `ActionCableClient`. Pod installation issue

我正在尝试将 pod ActionCableClient 安装到我的项目中,但是在安装 pod 之后,我遇到了很多错误,因此我无法构建。因此,我尝试在安装 pod 后下载他们的示例和 运行 项目,效果很好。当我检查他们的 pod 文件时,它也提到了一个路径。所以,我在我的项目中尝试了相同的 Podfile 内容,下面是我的 Podfile 现在的样子。

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

def common_pods
  pod 'ActionCableClient', :path => '../'
  pod 'SwiftyJSON'
  pod 'SnapKit'
end

def common_test_pods
  pod 'Quick', '~> 0.9.3'
  pod 'Nimble', '3.2.0'
end

target 'ActionCableTest' do
  common_pods
end

但是当我尝试进行 pod 安装时,出现错误

No podspec found for ActionCableClient in ../

但很奇怪,它适用于他们提供的示例应用程序。我在这里错过了什么吗?我是否需要在项目设置中添加任何其他内容?感谢任何帮助

您要做的唯一改变 --> :path => 到 :git =>

use_frameworks!

def common_pods
  pod 'ActionCableClient', :git => 'https://github.com/danielrhodes/Swift-ActionCableClient.git'
  pod 'SwiftyJSON'
  pod 'SnapKit'
end

def common_test_pods
  pod 'Quick', '~> 0.9.3'
  pod 'Nimble', '3.2.0'
end

target 'ActionCableTest' do
  common_pods
end

我希望这对你有用。

或者您可以这样设置路径:

pod 'ActionCableClient', :path => '~/Path/Of/ActionCableClient'

尽情享受吧。

如果 ActionCableTest 是您的主要目标,请选中此选项;

use_frameworks!

def common_pods
  pod "ActionCableClient"
  pod 'SwiftyJSON'
  pod 'SnapKit'
end

def common_test_pods
  pod 'Quick', '~> 0.9.3'
  pod 'Nimble', '3.2.0'
end

target 'ActionCableTest' do
  common_pods
end

如果你想设置特定的目标

 pod 'ActionCableClient', :git => 'https://github.com/danielrhodes/Swift-ActionCableClient.git'

如果你想用标签设置特定的目标

 pod 'ActionCableClient', :git => 'https://github.com/danielrhodes/Swift-ActionCableClient.git', :tag => 'v0.2.3'

如果要设置路径

pod 'ActionCableClient', :path => 'RawPods/'

RawPods 文件夹包含 ActionCableClient 文件夹。之后 ActionCableClient 文件夹包含 .podspec 文件