Can't install Firebase/InAppMessagingDisplay: they required higher minimum deployment target

1.4k Views Asked by At

I'm trying to use Firebase In-App Messaging and just added some lines to my Podfile.
But when I run pod install, I got an error message below:

[!] 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.

I also tried pod install --repo-update, but got the same error.
How can I install the pod?

My cocoapod is 1.5.3, and Xcode is 10.1.
Here's my 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

And the result of 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)
3

There are 3 best solutions below

0
On

InAppMessaging requires Firebase 5.x. Do a pod update so that your existing pods will update past their currently install versions.

0
On

This is what I did.

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

Save podfile.

  1. Quit xCode
  2. Delete Pods folder and Podfile.lock
  3. run pod install --verbose
  4. if issue is resolved, thats good.

Else do following steps, it will update all your Pods

  1. pod update

hope it helps.

0
On

Before you begin, you need a few things set up in your environment:

  • An app with Firebase enabled: If you haven't already, add Firebase to your iOS project.
  • Xcode 9.2 or higher: Firebase In-App Messaging needs a relatively-recent version of Xcode to run. You can find the latest Xcode version at Apple's Xcode site.
  • CocoaPods 1.4.0 or higher: Firebase In-App Messaging uses CocoaPods to manage dependencies on iOS. You can install it from the CocoaPods site.

One more thing to do, update Firebase SDK using pod update 'Firebase' and then after add Firebase/InAppMessagingDisplay dependency in a pod file.

It will start installing once execute pod install command in terminal.