Use of unresolved identifier 'FIRDatabase' when using Firebase

use of unresolved identifier swift function
use of unresolved identifier swiftui
use of unresolved identifier 'window' appdelegate
use of unresolved identifier swift 5
use of unresolved identifier 'self'
use of unresolved identifier 'contentview'
use of unresolved identifier 'imagestore'
use of unresolved identifier swift objective-c

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

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

'Use of Unresolved Identifier' in Swift, One possible issue is that your new class has a different Target or different Targets from the other one. For example, it might have a testing  calling var b = ARelated() will give ‘Use of unresolved identifier: ARelated’. You can either: 1) separate the classes if wanted on the same file: A.swift. class A { } class ARelated { } 2) Maintain your same structure and use the enclosing class to get to the subclass: var b = A.ARelated

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.

Error: use of unresolved identifier - Using Swift, New to Swift here I'm trying to play with local imports I have a project called glfw and I'm importing a local project glm, both under git and glm is  02/12/2019 How To Fix Warning Attempt To Present Uialertcontroller On Viewcontroller Whose View Is Not In The Window Hierarchy

New syntax for using FIRDatabase:

Database.database().reference()

How To Fix Error Use Of Unresolved Identifier 'RootViewController , Fix Use Of Unresolved Identifier 'RootViewController' In Xcode Swift Project Error Steps. First i create another new cocoa touch class in the  Use of unresolved identifier 'image' Ask Question Asked 7 months ago. Active 7 months ago. Viewed 285 times 0. I have a slight problem. I'm trying to make a camera in

This worked for me

  1. Add pod 'Firebase/Database' to your pod file
  2. pod install
  3. Open XCode and Rebuild Project

Use of unresolved identifier 'FoodVendingMachine', Use of unresolved identifier 'FoodVendingMachine'. Not sure where I went wrong​. Below is my viewController.swift. followed by  calling var b = ARelated() will give 'Use of unresolved identifier: ARelated'. You can either: 1) separate the classes if wanted on the same file: A.swift. class A { } class ARelated { } 2) Maintain your same structure and use the enclosing class to get to the subclass: var b = A.ARelated

  1. First Just make sure your pod file contains pod 'Firebase/Database'
  2. Add those two lines to your code:

import Firebase

import FirebaseDatabase

Use of unresolved identifier 'find' |Apple Developer Forums, Thanks in advance for the help! Using Xcode 9.3. I'm getting a Use of unresolved identifier find error in the rowCheck function. Heres my code: I am trying to get Date in Swift3 using let date = Date() but it is showing "error: use of unresolved identifier 'Date'" How to resolve it?

Swift: Use of unresolved identifier 'Use of unresolved , I can't compile because the compiler throw error Use of unresolved identifier '​PhoneAuthProvider'. I am Using Firebase (3.17.0) Using FirebaseAnalytics (3.9.0​)  Currently your are using the identifiers for Objective-C. You need to use the identifier for swift: UIApplicationState.Inactive // equals UIApplicationStateInactive UIApplicationState.Background // equals UIApplicationStateBackground Apple documentation for: Swift Objective-C You can check the documentation for both languages in the Apple Documentation and choose the language in the top right

Use of unresolved identifier 'UIApplication',Use of unresolved , Description iam getting these errors in swift 4 in xcode 9.2 Use of unresolved identifier 'UIApplication', Use of unresolved identifier 'UIEvent' in  Followed directions on linking framework with my project. In app delegate getting the following errors: "Use of unresolved identifier 'Client'" same for Configuration and Session Any advice?

"Use of unresolved identifier 'SCIGeneric'", "Use of unresolved identifier 'SCIGeneric'". I'm attempting to integrate some of the tutorial swift code into my app and I'm getting stuck on this error. Seems like 

Comments
  • what is your pod file content ?
  • Updated question with its' content.
  • Thanks! I was assuming it would be all installed with pod 'Firebase'. So I need to install all other features one by one?
  • i edited the answer with the link of what pod includes what
  • You also have to do a pod install in your root dir where your Podfile is located to get it to work.
  • This is giving me a "no such module 'FirebaseDatabase'" error
  • @luckyging3r can you please share your Podfile.lock?
  • my podfile contents are: pod 'Firebase' pod 'Firebase/Database'
  • Fixed it with a pod install
  • Welp, can't believe they forgot to add this on the docs. Thanks man!