首页 > 解决方案 > Firebase pod 'InAppMessagingDisplay'

问题描述

我在安装 Firebase 新功能“应用内消息”时遇到了困难。尝试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 文件:

target 'MyProject' do
    platform :ios, '10.1'
    inhibit_all_warnings!
    use_frameworks!

    pod 'AlamofireImage', '~> 3.1'
    pod 'AKPickerView-Swift', :git => 'https://github.com/Akkyie/AKPickerView-Swift.git', :inhibit_warnings => true
    pod 'Firebase/Database', '~> 5.0.0'
    pod 'Firebase/Messaging', '~> 5.0.0'
    pod 'Firebase/Core'
    pod 'Firebase/Auth'
    pod 'Firebase/RemoteConfig'
    pod 'Firebase/InAppMessagingDisplay'
    pod 'Google/Analytics'
    pod 'Protobuf', '~> 3.2', :inhibit_warnings => true
    pod 'PromiseKit/CoreLocation', '~> 4.1'
    pod 'GoogleConversionTracking'
    pod 'FBSDKCoreKit'
    pod 'Branch'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'Apply'
    pod 'SnapKit', '>= 4.0.0'
    pod 'KeychainSwift', '~> 10.0'
    pod 'Bond'
end

我在这里阅读了其他问题并尝试了两种不同的解决方案。首先我尝试了这个: 1. pod repo remove master 2. pod setup 3.pod install 这没有用。得到同样的错误。

然后我尝试了这个:1. pod repo update 2. pod deintegrate 3.pod install 结果相同。

你们中有人遇到过这种情况并知道解决方案吗?

标签: iosswiftfirebasecocoapodsfirebase-in-app-messaging

解决方案


您需要以下两个 Firebase SDK 的更高版本才能使用应用内消息传递

pod 'Firebase/Database', '~> 5.0.0'
pod 'Firebase/Messaging', '~> 5.0.0'

推荐阅读