Error in installing the 'Firebase/Crashlytics' pod in Swift

Viewed 7840

I am installing the pod 'Firebase/Crashlytics' into my Xcode project. the project configuration is: XCode: 10.3 Swift Version: 4.2 Pod Version: 1.8.0.beta.2

Error after pod install:

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In snapshot (Podfile.lock):
    Firebase/CoreOnly (= 6.4.0)

  In Podfile:
    Firebase/Auth was resolved to 6.4.0, which depends on
      Firebase/CoreOnly (= 6.4.0)

    Firebase/Crashlytics was resolved to 6.15.0, which depends on
      Firebase/CoreOnly (= 6.15.0)

[!] Automatically assigning platform `iOS` with version `11.0` on target `Projects` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Other pods in my podfile:

# Uncomment the next line to define a global platform for your project

pod 'SwifterSwift'
pod 'AlamofireNetworkActivityIndicator'
pod 'ReachabilitySwift'
pod 'IQKeyboardManagerSwift'
pod 'Nuke'
pod 'FlagPhoneNumber'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
pod 'SDDownloadManager'
pod 'Cosmos', '~> 18.0'
pod 'Socket.IO-Client-Swift', '~> 13.2.0'
pod 'SwiftyJSON', '= 4.0'
pod 'AppImageViewer'
pod 'MDGroupAvatarView'
pod 'OpalImagePicker'
pod 'KMPlaceholderTextView', '~> 1.4.0'
pod 'CropViewController'
pod 'GrowingTextView', '0.6.1'
pod 'Firebase/Crashlytics'
end
4 Answers

change

pod 'Firebase/Core'

to

pod 'Firebase/CoreOnly'

Edited:

For my case, I've specified pod version in Podfile, so I have to change this line in my Podfile.

This is issue was coming due to diff version of pods because the old firebase pods were not updated and the default new pod are installed with a higher version.

To install new pod and update the old pods

  1. We have to update the cocoa-pods
  2. Update specific pods so that other pods won't be disturbed

enter image description here

Just a few steps

Step 1: Firebase/CoreOnly pod update

pod update 'Firebase/CoreOnly'

Step 2: pod install

pod install

For me it was an extra line with old version

pod 'Firebase', '6.13.0'

Just removing the line solved the issue. Or you can change the version to the latest version.

Related