'Read from firebase database with Swift
I'm struggling to get the value I need from Firebase
I have this setup
MyAppName:
- version : 1.0
and I am trying to get it like so:
let refHandle = dbRootRef.observe(FIRDataEventType.value, with: { (snapshot) in
let postDict = snapshot.value as? [String : AnyObject] ?? [:]
print(postDict)
})
Can someone help me get the 1.0 from the database?
p.s - no errors and nothing in the console
Solution 1:[1]
Do you have pod file configured? and also App Delegate configuration? Google Plist File Added? Getting a Value from Firebase is pretty straightforward,. Follow this tutorial and you would be ready to go! https://www.youtube.com/watch?v=joVi3thZOqc&index=10&list=PLl-K7zZEsYLn-elkHPhDuuwdCZ93BXnrB
Thats the only way I can help with the information you gave about your problem, hope it helps!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Glorfindel |
