Cannot Import Firebase Into Swift Class

For me it was this:

The Framework is called FirebaseAnalytics now and not Firebase.

The official documentation even has this wrong.

So after installing with CocoaPods (Firebase version 3.4.0) this works:

import FirebaseAnalytics

There are two ways to install Firebase: manually, and with CocoaPods.

I recommend using CocoaPods. In your Podfile, make sure you specify use_frameworks!:

platform :ios, "9.0"
use_frameworks!

target 'MyProject' do
 pod 'Firebase'
end

Then after you pod install and open the MyProject.xcworkspace, you should be able to use import Firebase.

edit by Jay:

If you are targeting OS X your pod file may look more like this

platform :osx, '10.10'
use_frameworks!

target 'MyProject' do
  pod 'FirebaseOSX', '>= 2.4.2'
end

If you imported Firebase manually, update Framework Search Paths and Header Search Paths under your target's Build Settings so they include the Firebase frameworks.