Firebase References Undeclared

Firebase References undeclared

Just had the same problem, but after a while I realized that I was missing an entry in the pod-file, your pod-file should contain:

pod 'Firebase/Database'

Hope it works now :)

FirebaseIOS: Use of Undeclared Type 'DatabaseReference'

Be sure to add an import of firebase database in the file you call DatabaseReference and not just import Firebase alone

 import FirebaseDatabase

Firebase IOS on Swift: Use of undeclared type 'DatabaseReference'

You should try Shift + CMD + K to clean your project then CMD + B to rebuild

Use of undeclared type 'Firebase'

It seems that you are using old deprecated version of Firebase.

Read the new docs for the setup details.

Your code should be like this:

import Firebase

var ref = FIRDatabase.database().reference()

public static func createUrlToGetMessages(threadId id: String) -> FIRDatabaseReference {
return ref.child("chats").child(id).child("messages")
}

public static func createUrlToGetOneMessageRef(threadId: String, messageId: String) -> FIRDatabaseReference {
return ref.child("chats").child(threadId).child("messages").child(messageId)
}

Use of undeclared type Firebase

Here are the new Firebase Docs. Firebase is now split into multiple libraries, so now the correct way to create a reference is:

var myRef = FIRDatabase.database().reference()

This is a reference to the root of your database. You might have to import FirebaseDatabase, but this should work.

Firebase 3.x issue: FIRUserInfo is an undeclared identifier

Found the answer. Change this: FIRUserInfo *profile
... to this:

id<FIRUserInfo> profile

Man I must have been REALLY tired to miss that.
Sorry for yelling, internets...



Related Topics



Leave a reply



Submit