Please help. After migrating to new Firebase I can\'t retrieve data. Use this construction:
let ref = FIRDatabase.database().reference()
override func viewDidL
So, with mine, I also had a ref being declared immediately when the view controller was instantiated. I had to make it load after the app had been configured in the app delegate with FIRApp.configure()
.
Before:
let serverRef = Firebase("firebaseURL")
After:
lazy var serverRef = FIRDatabase.database().reference()
This delays the instantiation of the database reference until its needed, which wont be until viewDidLoad
on your initial view controller.