FirebaseIOS: Use of Undeclared Type 'DatabaseReference'

use of undeclared type remoteconfig
use of undeclared type datasnapshot
firebase ios tutorial
use of unresolved identifier 'firestore' swift
firebase database ios
pod 'firebase/database

Sorry for the weird question

Yesterday I had to update my firebase pod, before that everything was fine, but after that, I can't retrieve data anymore

So here's my code

    //  let userID = FIRAuth.auth()?.currentUser?.uid
    var rsef: DatabaseReference! // undeclared

    rsef = Database.database().reference() //. undeclared

I read the official firebase setup instructions, those are right, but I don't know why it says undeclared

For reference, here's my full code

 ref.child("KurdishRsta").child((FIRAuth.auth()?.currentUser?.uid)!).childByAutoId().queryOrderedByKey().observe(.childAdded, with:
        { (snapshot) in
            print("Database\(String(describing: snapshot.value))")
        let value = snapshot.value as? NSDictionary
        let FullRsta1 = value?["Rsta"]
        let FullMeaning1 = value?["Meaning"]

        self.RetrivedRsta.insert(RstasFromFirebase(FullRsta:FullRsta1 as! String ,FullMeaning : FullMeaning1 as! String), at: 0)



the podfile

    Target 'Dictionary' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
   pod 'SDWebImage', '~>3.8'
   pod 'Firebase/Core'
   pod 'Firebase/Auth'
   pod 'Firebase/Storage'
   pod 'Firebase/Database'

  # Pods for Dictionary
pod 'SVProgressHUD'
pod 'SKSplashView'
pod "FGTranslator"
pod 'SCLAlertView-Objective-C'
pod 'OneSignal'
pod 'Google/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Database'
pod 'ChameleonFramework'
pod 'QMChatViewController'
pod 'ApiAI'
pod 'Firebase/RemoteConfig'
pod "ZHPopupView"
pod 'FCAlertView'
pod 'JSQMessagesViewController'
pod "CZPicker"
pod 'DTTJailbreakDetection'
pod 'MBProgressHUD', '~> 1.0.0'
pod 'PayPal-iOS-SDK'

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

 import FirebaseDatabase

Firebase References undeclared, var ref:FIRDatabaseReference! in the same ViewController, then it throws an error: Use of undeclared type 'FIRDatabaseReference'. And this� This page describes the data types that Cloud Firestore supports. Data types. The following table lists the data types supported by Cloud Firestore. It also describes the sort order used when comparing values of the same type:

if it worked before then it must be the pod file, here is mine for reference.

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/Auth'
pod 'FacebookCore'
pod 'FacebookLogin'
target 'MyAwesomeApp' do
  # Comment this line if you're not using Swift and don't want to use 
dynamic frameworks

  # Pods for MyAwesomeApp

  target 'MyAwesomeAppTests' do
    inherit! :search_paths
    # Pods for testing

  target 'MyAwesomeAppUITests' do
    inherit! :search_paths
    # Pods for testing


Firestore iOS 11.0.2 � Issue #349 � firebase/quickstart-ios � GitHub, when I run my app in my device with iOS 11.0.2 I get this errors from Firestore. " Use of undeclared type 'DocumentReference'" "User of und For iOS client apps, you can receive notification and data payloads up to 4KB over the Firebase Cloud Messaging APNs interface. To write your client code in Objective-C or Swift, we recommend that you use the FIRMessaging API.

Swift Version 5, Firebase (6.5.0), FirebaseAnalytics (6.0.4), FirebaseDatabase (6.0.0)

Follow steps on the Google's Page

Earlier use of import FirebaseDatabase has been removed. Use only import Firebase in a Swift file and to use a database reference a variable can be used as var firebaseDatabaseRef: DatabaseReference!

If the issue persist please try to clean and build a project couple of times or use following commands from the terminal and try to clean and build again.

$pod deintegrate

and then

$pod install


pod 'Firebase/Analytics'
pod 'Firebase/Database'

Use of undeclared identifier , Hello, recently i wanted to implement firebase ui auth in my project specially is: Use of undeclared identifier 'FIRAuthErrorUserInfoUpdatedCredent. pod ' GooglePlacesSearchController' pod 'ChameleonFramework/Swift'� SwiftUI Preview quit working: use of undeclared type in thunk My preview was working great. Then, without any code modifications, I went to show it to my colleagues and it started failing when I hit resume (I made no modifications to this project.

In my case, git was ignoring Pods directory so pretty much every time I changed branch I had to run pod install command (minor changes on the configurations).

In one of those changes I started getting this error. I tried cleaning build folder, delivery data folder, restart, and none worked until I delete the content of Pods directory and run pod install.

xcode, swift4 xcode9.2 Firebase official video The code is imitated by looking at it, but Use of undeclared type'DataSnapS. Last I recall, BindableObject was renamed to ObservableObject and @ObjectBinding is now @ObservedObject. Additionally, in an ObservableObject you no longer need to implement didChange yourself, you just use the @Published attribute on any properties you want to publish and the rest will be taken care of for you.

FirebaseIOS: Use of Undeclared Type 'DatabaseReference', currentUser?.uid var rsef: DatabaseReference! // undeclared rsef = Database. database().reference() //. undeclared I read the official firebase setup instructions, � The type of this object is JSQMessage, as defined in property messages, so that’s why you can use the property on that message object. Pfew! That’s quite a bit of code… Ready to finally write some interactive, message-sending code?

Authenticate Using Google Sign-In on iOS, In your app delegate's application:didFinishLaunchingWithOptions: method, configure the FirebaseApp object and set the sign-in delegate. Swift�

Re: [Firebase] Use of undeclared type with FIRDatabase and , Hi Fred! Once you have Firebase installed, there's a bit of setup to enable some of the components, such as the database. Just in case you�

  • Can you post your podfile and the import of Firebase in your code please ?
  • @GabrielDiez ofcourse, i've edited my post
  • What happens when you run ‘pod outdated’ from the command line? Maybe for some reason it’s pulling an older dependency if it’s in the Podfile.lock file. Actually another way you could check is if you replace ‘DatabaseReference’ with ‘FIRDatabaseReference’ and if that works, it pulled the outdated pod for some reason.
  • The Firebase documentation doesn't mention importing FirebaseDatabase. Your solution does seem to work for me though!
  • Google should just make up their mind about what each framework contains once and for all. They keep changing this from one version to another... Docs are outdated.
  • thanks, neither i dont think its the podfile, i guess its firebase' is it working on your side?
  • The error you're getting suggests a dependency or scoping issue. Very unlikely that its related to your code. If you email me the file in question I might have a better chance at solving your issue. I have to add the good ol' "have you restarted your computer" question too, apple products are far buggier than people like to admit.
  • pod 'Firebase/Database' is the key