问题
I am using firebase realtime database in my iOS application. I am using insert into database and find user depending on filter query in my application. It all works fine. Sometimes suddenly my ipad and iPhone stop responding to firebase queries. Many a times it happens that same application runs perfect on one device and doesn't work on other . Or same build when deleted and installed stops working on ipad/iphone. To troubleshoot this I generaly recreate my firebase authentication client id and replace my GoogleServiceInfo.plist. But this is not the solution as sometimes it works and sometimes not. Can anybody help regarding this issue?
回答1:
I had similar problems, it seems that there is a bug for GET request from the database. What I have done is send a Post request i.e.
var rootReference = FIRDatabase.database().reference()
referenceToPath.setValue(values)
Where values are any dictionary of say type [String:String], this writes to the database and it seems to unlock the database and you can read form it.
来源:https://stackoverflow.com/questions/43752966/iphone-ipad-suddenly-stops-responding-to-firebase-queries