Reputation: 39
After migrating to Firebase 4.0 , I have this REALLY annoying issue with the Reference to the DB.*
"Cannot convert return expression of type 'DatabaseReference' to return type 'DatabaseReference'
Very frustating , I try to make a switch on a enum, to set multiple ref.
Even when I try to follow the new Docs.
Upvotes: 1
Views: 551
Reputation: 1022
Alternative to @erdos's solution, if you want to keep you enum name then reference the module FirebaseDatabase:
FirebaseDatabase.DatabaseReference
Upvotes: 0
Reputation: 73
pod 'Firebase', '<4'
pod 'Firebase/Database', '<4'
pod 'Firebase/Auth', '<4'
pod 'Firebase/Storage'
Upvotes: 0
Reputation: 662
The compiler is getting confused with the Firebase class DatabaseReference
and your enum of the same name DatabaseReference
. Try using a different name for your enum.
Upvotes: 1