Marco Buonastella
Marco Buonastella

Reputation: 57

Unable to find a specification for 'Firebase' (IOS Swift)

I am adding cocoa pods to my ios project (swift). I have initalized the pods in the project directory using 'pod init myproject.xcodeproj'. I then added pod 'Firebase' to the Podfile as such:

project 'HOTS IOS.xcodeproj/'

platform : ios, '9.0'

target 'HOTS IOS' do

  use_frameworks!

  pod 'Firebase'

  target 'HOTS IOSTests' do 
    inherit! :search_paths
    pod 'Firebase'
  end

  target 'HOTS IOSUITests' do 
    inherit! :search_paths
    pod 'Firebase'
  end

end

Now when I run pod install i get the error: Unable to find a specification for 'Firebase'.

Upvotes: 0

Views: 696

Answers (1)

whoswho
whoswho

Reputation: 202

Depending on what Firebase service you want to use you have to add different Firebase services in your podfile. "'Firebase'" is not a valid pod.

pod 'Firebase/Core' is the most basic and will give you the prerequisite libraries needed to get Firebase running. If you want to use other services you can choose between these pods:

pod 'Firebase/Core' --> Prerequisite libraries and Analytics

pod 'Firebase/AdMob' --> AdMob

pod 'Firebase/Messaging' --> Cloud Messaging / Notifications

pod 'Firebase/Database' --> Realtime Database

pod 'Firebase/Invites' --> Invites

pod 'Firebase/DynamicLinks' --> Dynamic Links

pod 'Firebase/Crash' --> Crash Reporting

pod 'Firebase/RemoteConfig' --> Remote Config

pod 'Firebase/Auth' --> Authentication

pod 'Firebase/Storage' --> Storage

(Note: without --> text. Only add for example pod 'Firebase/Database')

Here is the documentation for setting up iOS:

https://firebase.google.com/docs/ios/setup

Upvotes: 0

Related Questions