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
Bit Field Larger Than 64 Shifts in Swift
Enabling Gestures in Realitykit
Assemble a List of Users with Geofire/Firebase
Compiler Cannot Infer Return Type
Build Realm for Swift 3 & Xcode 8
Dynamic Uicollectionview Inside Dynamic Uitableviewcell
Float Is Not Convertible to 'Mirrordisposition' Swift What Is Mirrordisposition
Realm, Avoid to Store Some Property
Captureoutput Function Isn't Called Using Setsamplebufferdelegate
How to Create Objects from Swiftyjson
From the Swift Repl, How to Get a List of Available Modules
Uicollectionview Autosize and Dynamic Number of Rows
How to Create a Multiline Textfield in Swiftui? Like the Notes App