iOS ML Kit - 无法使用 cocoapods 安装

iOS ML Kit - Cannot install with cocapods

我有最新的 pod 版本 1.5.2,但是我无法从 firebase 安装 ml kit,我得到这个:

   Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/MLVision":
  In Podfile:
    Firebase/MLVision

None of your spec sources contain a spec satisfying the dependency: `Firebase/MLVision`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

有什么解决办法吗?

我的解决方案:

首先尝试: brew install ruby , sudo gem install 然后更新 repo:

pod repo update

就是这样,您将安装 Firebase

的 ML Kit pods

我的播客文件:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'ML test' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for ML test
  pod 'Firebase/Core'
  pod 'Firebase/MLVision'

end