Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of unresolved identifier 'FIRDatabase' when using Firebase

Tags:

Xcode tells me that FIRDatabaseis not an identifier. My code:

import UIKit import Firebase  @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {      var window: UIWindow?      func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {         FIRApp.configure()         FIRDatabase.database().persistenceEnabled = true // Use of unresolved identifier 'FIRDatabase'         return true     } } 

I am using:

Xcode 7.2.1, Firebase 3.0.2, OSX 10.10.5

Podfile content:

source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks!  target 'myapp' do pod 'IQKeyboardManagerSwift', '<= 4.0.0' pod 'JSQMessagesViewController', '<= 7.3.1' pod 'Firebase' end 
like image 742
MJQZ1347 Avatar asked Jun 03 '16 16:06

MJQZ1347


1 Answers

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

like image 70
Ymmanuel Avatar answered Sep 20 '22 00:09

Ymmanuel