firebase-realtime-database

Firebase database bandwidth usage growing rapidly even when when the database is not in use

一笑奈何 提交于 2019-12-30 03:57:04
问题 Update: After 9 months of back-and-forth emails (over 40 emails), Google has acknowledged that they have found some bugs that may be responsible for high bandwidth usage, but bandwidth usage is still too high. Resolving this issue does no appear to be a priority for Google/Firebase (it took them 1.5 months to respond to the last email). In light of similar complaints such as: https://news.ycombinator.com/item?id=14356409, and many others, across a wide range of teams/developers, hopefully the

Firebase Swift: queryEqualToValue by childKey is not working

时光总嘲笑我的痴心妄想 提交于 2019-12-30 03:07:04
问题 Has anyone have any luck using the function: .queryEqualToValue(value: AnyObject?, childKey: String?) Two things: 1) The childKey does not seem to allow deep paths, just direct children 2) I can't get it to work at all! Given my structure: "post": { "groupName": "hello world" } If I do a simple: postRef.queryEqualToValue("hello world", childKey: "groupName").observeSingleEvent( ... ) It does not return any posts at all. Instead I have to do the roundabout way of: postRef.queryOrderedByChild(

Swift - Firebase search in database

有些话、适合烂在心里 提交于 2019-12-29 14:56:07
问题 I search for users while typing. However at the end it returns every users. I don't know why exactly this happens. It seems alright class func findUsers(text: String)->[User]{ let user = User() var users = [User]() ref.child("Users").queryOrderedByChild("name").queryStartingAtValue(text).observeEventType(.Value, withBlock: { snapshot in for u in snapshot.children{ user.name = u.value!["name"] as? String user.surname = u.value!["surname"] as? String user.email = u.value!["email"] as? String

Class is missing a constructor with no arguments - but I've provided a constructor

六月ゝ 毕业季﹏ 提交于 2019-12-29 09:49:07
问题 I am trying to retrieve the user's info after they log in from Firebase. I have the sneaking suspicion that this error isn't actually my problem - and has to deal with the fact that I'm using ServerValue.Timestamp to store the date/time for a user when they've registered (as I'm trying to pull dateJoined back out, and my class has no idea what to do with it). My database looks something like this: And when logging in, this is the code I use to grab the user's information //grab user's name

Why is it okay to allow writes into Firebase from the client side?

那年仲夏 提交于 2019-12-29 09:49:06
问题 I know when querying from Firebase, you should be extra careful on making sure you're reading the data you want to, but aren't front end writes susceptible to malice? For instance, an attacker could populate their age field with a string (or maybe a dict) instead of a number. Let's say I do a giant query on the backend to compute the average age of users on my site. I do a get for each age and forget to force any strings to integers. Doing this compute with a string crashes my app.

Class is missing a constructor with no arguments - but I've provided a constructor

佐手、 提交于 2019-12-29 09:49:05
问题 I am trying to retrieve the user's info after they log in from Firebase. I have the sneaking suspicion that this error isn't actually my problem - and has to deal with the fact that I'm using ServerValue.Timestamp to store the date/time for a user when they've registered (as I'm trying to pull dateJoined back out, and my class has no idea what to do with it). My database looks something like this: And when logging in, this is the code I use to grab the user's information //grab user's name

Is it possible to define a variable on the firebase database references path?

a 夏天 提交于 2019-12-29 09:35:11
问题 I am trying to redefine all my apps database references so that I can write a specific set of of firebase rules (I need to add buildings and depts nodes inside the user node – read why: What is the best practice to write the rules of Firebase in a situation like this? ). I am using a firebase-config.js and exporting all my app's database references to the app's components so hopefully if I change this path I don't have to refactor the code on all the app's components. I am trying to do it

New Firebase retrieve data and put on the tableView (Swift)

无人久伴 提交于 2019-12-29 09:14:25
问题 I made a simple social media with new Firebase, and I successfully save string with database and image with storage, but when it comes to retrieve data back to the tableView the unusual things happen! all the images retrieve back randomly show up and continually shift, but other part shows perfectly or when I using return posts.count tableView shows no post. Hope someone can kindly give me some suggestion import UIKit import Firebase import FirebaseStorage class timelineTableViewController:

New Firebase retrieve data and put on the tableView (Swift)

跟風遠走 提交于 2019-12-29 09:14:12
问题 I made a simple social media with new Firebase, and I successfully save string with database and image with storage, but when it comes to retrieve data back to the tableView the unusual things happen! all the images retrieve back randomly show up and continually shift, but other part shows perfectly or when I using return posts.count tableView shows no post. Hope someone can kindly give me some suggestion import UIKit import Firebase import FirebaseStorage class timelineTableViewController:

does the firebase database online editor ignore security rules

天大地大妈咪最大 提交于 2019-12-29 09:08:23
问题 I have rules set up that ensure a foreign key like constraint: when I put data at a certain path, the key is validated to exist at another node. Rule snippet: "app": { "freebies": { "$provider_id": { ".validate": "newData.parent().parent().parent().child('app').child('providers').child($provider_id).val() != null" } } } If I run a simulation with these params Write to /app/freebies width data: {"totally_fake": 1} This fails, which is CORRECT. On the other hand, if I just go to the online