LetzFlow
LetzFlow

Reputation: 481

CocoaPods stopped installing Firebase/Analytics with error

I've installed Firebase/Analytics into an iOS Project yesterday (as I've done many times before) and today I wanted to add Firebase/Crashlytics and suddenly both of them don't work anymore.

I get the following error message:

[!] CocoaPods could not find compatible versions for pod "Firebase/Crashlytics": In Podfile: Firebase/Crashlytics (= 4.0.0)

There are other pods (e.g. GoogleMaps, Resolver, Alamofire, etc) which work fine. Just the Firebase/* stuff doesn't work.

If I remove the / and try to install FirebaseAnalytics and FirebaseCrashlytics it works (the pod install does at least) but then xCode tells me it cannot find the Firebase module.

Here is my pod env

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Stack

   CocoaPods : 1.9.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15.4 (19E287)
       Xcode :  ()
         Git : git version 2.24.2 (Apple Git-127)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 8fd5e2704f3952940bbdb6fcc7dc6c138594e6ff

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.2.0

Podfile

# workspace 'project.xcworkspace'
platform :ios, '11.0'
use_frameworks!

# Pods for project
pod 'Resolver', '1.1.2'
pod 'GoogleMaps', '3.8.0'
pod 'GooglePlaces', '3.8.0'

pod 'Alamofire', '5.0.0-rc.2'
pod 'AlamofireObjectMapper', '6.2'
pod 'AlamofireNetworkActivityLogger', '3.0'

pod 'Firebase/Crashlytics', '4.0.0'
pod 'Firebase/Analytics', '6.4.2'

target 'project' do
  # any project specific pods
end

I'm at a bit of a loss here and any hints would be greatly appreciated.

Upvotes: 3

Views: 11281

Answers (2)

hmhv
hmhv

Reputation: 31

It's because of version conflict.

use pod 'Firebase/Crashlytics' with slash and without version. (or newest version)

and run pod update Firebase/Crashlytics Firebase/Analytics

if you have other version conflict, run pod update Firebase/Crashlytics Firebase/Analytics GoogleXXX(s)

Upvotes: 3

Paul Beusterien
Paul Beusterien

Reputation: 29547

Remove the slashes from Firebase/Crashlytics and Firebase/Analytics.

The slash indicates a subspec of the Firebase pod.

You could also leave the slash and specify the version of the last Firebase pod - 6.23.0.

Upvotes: 6

Related Questions