【问题标题】:Can't install Firebase/InAppMessagingDisplay: they required higher minimum deployment target无法安装 Firebase/InAppMessagingDisplay:它们需要更高的最低部署目标
【发布时间】:2018-11-15 11:20:28
【问题描述】:

我正在尝试使用 Firebase 应用内消息,只是在我的 Podfile 中添加了一些行。
但是当我运行pod install 时,我收到以下错误消息:

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

Specs satisfying the `Firebase/InAppMessagingDisplay` dependency were found, but they required a higher minimum deployment target.

我也试过pod install --repo-update,但得到了同样的错误。
如何安装吊舱?

我的 cocoapod 是 1.5.3,Xcode 是 10.1。
这是我的 Podfile:

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

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

  # Pods for iOSTestApp
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'  
  pod 'Firebase/DynamicLinks'
  pod 'Firebase'
  pod 'Firebase/InAppMessagingDisplay'

  target 'iOSTestAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

还有pod outdated的结果:

- Firebase 4.4.0 -> (unused) (latest version 5.12.0)
- FirebaseAnalytics 4.0.4 -> 5.3.0 (latest version 5.3.0)
- FirebaseCore 4.0.9 -> 5.1.7 (latest version 5.1.7)
- FirebaseDynamicLinks 2.1.0 -> 3.1.1 (latest version 3.1.1)
- FirebaseInstanceID 2.0.5 -> 3.3.0 (latest version 3.3.0)
- FirebaseMessaging 2.0.5 -> 3.2.1 (latest version 3.2.1)
- GoogleToolboxForMac 2.1.3 -> (unused) (latest version 2.1.4)
- nanopb 0.3.8 -> 0.3.901 (latest version 0.3.901)
- Protobuf 3.4.0 -> 3.6.1 (latest version 3.6.1)

【问题讨论】:

  • 您找到解决方案了吗?我遇到了几乎相同的问题。

标签: xcode firebase cocoapods firebase-in-app-messaging


【解决方案1】:

InAppMessaging 需要 Firebase 5.x。执行pod update 以便您现有的 pod 将更新至超过其当前安装版本。

【讨论】:

    【解决方案2】:

    这就是我所做的。

    pod 'Firebase'
    pod 'Firebase/Core'
    pod 'FirebaseMessaging' #, '~> 2.0.5'
    pod 'Firebase/DynamicLinks'
    pod 'Firebase/InAppMessagingDisplay'
    

    保存 podfile。

    1. 退出 xCode
    2. 删除 Pods 文件夹和 Podfile.lock
    3. 运行 pod install --verbose
    4. 如果问题得到解决,那就太好了。

    否则,请执行以下步骤它将更新您的所有 Pod

    1. pod 更新

    希望对你有帮助。

    【讨论】:

      【解决方案3】:

      在开始之前,您需要在您的环境中设置一些东西:

      • 启用 Firebase 的应用:如果您还没有,请添加 Firebase to your iOS project
      • Xcode 9.2 或更高版本:Firebase In-App Messaging 需要相对较新版本的 Xcode 才能运行。您可以在Apple's Xcode site. 找到最新的 Xcode 版本
      • CocoaPods 1.4.0 或更高版本:Firebase In-App Messaging 使用 CocoaPods 来管理 iOS 上的依赖项。您可以从CocoaPods site 安装它。

      还有一件事情要做,使用 pod update 'Firebase' 更新 Firebase SDK,然后在 pod 文件中添加 Firebase/InAppMessagingDisplay 依赖项。

      在终端中执行 pod install 命令后将开始安装。

      【讨论】:

        猜你喜欢
        • 2016-09-18
        • 1970-01-01
        • 2021-04-29
        • 2020-04-01
        • 2016-01-30
        • 2018-02-06
        • 2021-11-06
        • 1970-01-01
        • 2011-07-23
        相关资源
        最近更新 更多