FirebaseIOS: Use of Undeclared Type 'DatabaseReference'
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
Podfile:
pod 'Firebase/Analytics'
pod 'Firebase/Database'
Be sure to add an import of firebase database in the file you call DatabaseReference and not just import Firebase alone
import FirebaseDatabase