I am retrieving data from firebase database.
When I debug the code from simulator it gives all the data from that node but when i debug the code from device it neither goes to success block nor error block. Nothing happens.
Code I have written is given below.
FIRDatabase.database().reference().child("registeredUserEmail").observeSingleEventOfType(.Value, withBlock: { (snapshot) in
debugPrint(snapshot.value)
if snapshot.hasChild(email.escapeEmail()) {
debugPrint("false")
completion(false)
}
else {
debugPrint("true")
completion(true)
}
}) { (error) in
debugPrint("error in isEmailFree - " + error.localizedDescription)
completion(false)
}
Here are the console logs when app first time launches
2016-06-07 11:36:30.471[4067:1092564] Configuring the default app. 2016-06-07 11:36:30.530[4067:] Firebase Analytics v.3200000 started 2016-06-07 11:36:30.532 Artup[4067:] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled 2016-06-07 11:36:30.576[4067:1092564] Firebase Crash Reporting: Successfully enabled 2016-06-07 11:36:30.590: FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO 2016-06-07 11:36:30.659 Artup[4067:] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist Config not fetched Error Error Domain=com.google.remoteconfig.ErrorDomain Code=8002 "(null)" UserInfo={error_throttled_end_time_seconds=1465279698.4105051} 2016-06-07 11:36:31.450 Artup[4067:] Firebase Analytics enabled