3

I'm having difficulties installing Firebase new feature "In-App Messaging". When trying to run pod install on the project, I get this error:

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

These are the pod files in my project:

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

I've read other questions in here and tried two different solutions. First I tried this: 1. pod repo remove master 2. pod setup 3. pod install Which didn't work. Got the same error.

Then I tried this: 1. pod repo update 2. pod deintegrate 3. pod install With the same result.

Have any of you experienced this and know a solution?

Knyhuus
  • 158
  • 1
  • 6
  • Just tried it, but got the error again. Even if I try not having any restrictions to the version of those two, I still get the same error. – Knyhuus Aug 24 '18 at 06:37
  • You need to update all your Firebase pods (pod update). The minimum firebase version required for me was 5.7.0 and it was 4.0.4 I had the same issue and now it's working very well. – Gustavo Barbosa Aug 29 '18 at 18:03

5 Answers5

2

You need higher versions of the following two Firebase SDKs to use in-app messaging

pod 'Firebase/Database', '~> 5.0.0'
pod 'Firebase/Messaging', '~> 5.0.0'
Cœur
  • 37,241
  • 25
  • 195
  • 267
Yong
  • 21
  • 1
  • Right, InAppMessaging was introduced in Firebase 5.6.0 – Paul Beusterien Aug 24 '18 at 00:34
  • Which version do you suggest I set them to? Tried setting them both to '~> 5.6', which resulted in this: "[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/Reachability": In Podfile: Firebase/Messaging (~> 5.6) was resolved to 5.6.0, which depends on FirebaseMessaging (= 3.1.0) was resolved to 3.1.0, which depends on GoogleUtilities/Reachability (~> 5.2) Specs satisfying the 'GoogleUtilities/Reachability (~> 5.2)' dependency were found, but they required a higher minimum deployment target. – Knyhuus Aug 24 '18 at 06:38
2

Reducing your Podfile to make it an MCVE, we can reproduce the issue with simply:

target 'MyProject' do
    pod 'Firebase/InAppMessagingDisplay'
end

So let's look at the specs:

https://cocoapods.org/pods/Firebase
https://github.com/CocoaPods/Specs/blob/master/Specs/0/3/5/Firebase/5.6.0/Firebase.podspec.json
→ Dependency on "FirebaseInAppMessaging": "0.11.0"
https://cocoapods.org/pods/FirebaseInAppMessaging
→ Redirection to https://firebase.google.com/docs/in-app-messaging/

Which means Firebase/InAppMessagingDisplay has a dependency on another spec that got REMOVED by Google. To demonstrate the removal:

$ pod repo update
$ pod search FirebaseInAppMessaging
[!] Unable to find a pod with name, author, summary, or description matching FirebaseInAppMessaging

But this spec exists, it was added nine days ago (Aug 16, 2018, 12:38 AM GMT+8) at: https://github.com/CocoaPods/Specs/blob/master/Specs/2/a/8/FirebaseInAppMessaging/0.11.0/FirebaseInAppMessaging.podspec.json. So some people may have it in cache.

I suggest you contact Google and ask them when they will restore FirebaseInAppMessaging. In the mean time, you can't use it.

Cœur
  • 37,241
  • 25
  • 195
  • 267
1
pod 'Firebase/Core', '~> 5.7.0'
pod 'Firebase/InAppMessagingDisplay'

Worked for me.

Ahmet Ardal
  • 1,162
  • 1
  • 11
  • 12
0

Try with pod install —repo-update, it could solve your problem.

Samuel Roberto
  • 441
  • 3
  • 7
0

I found a solution to this issue. My podfile was looking like yours. I have been cracking the pods dependencies and I found I was using an old reference for Google Analytics.

I was using pod 'Google/Analytics' instead of pod 'GoogleAnalytics'. Once I changed the cocoa pods reference following the list of pods published by Google everything worked fine.

Pods list published by Google

Fran Martin
  • 2,369
  • 22
  • 19