Xcode tells me that FIRDatabase
is not an identifier.
My code:
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApp
What worked for me, in addition to adding pod 'Firebase/Database'
, was (which is missing from the current docs):
import FirebaseDatabase
Tested with Xcode 7.3.1, CocoaPods 0.39.0 & 1.0.1 on macOS 10.11.5. To make sure you're doing this correctly, please make sure your Podfile.lock looks something like:
PODS:
...
- FirebaseDatabase (3.0.1):
- FirebaseAnalytics (~> 3.2)
...
P.S. I ran into CocoaPods issues that forced me to delete the derived data folder, so try that as well.
pod 'Firebase/Database'
to your pod file import
`*import Firebase
import FirebaseDatabase*`
Initialize and Configure your Firebase
`*var ref: DatabaseReference!
ref = Database.database().reference()*`
You need to add
pod 'Firebase/Database'
to your pod file as explained here
https://firebase.google.com/docs/database/ios/start
Here you can find which pod includes which feature Pods and Features
New syntax for using FIRDatabase:
Database.database().reference()
import Firebase
import FirebaseDatabase
This worked for me
pod 'Firebase/Database'
to your pod file