firebase-realtime-database

Are Firebase Bolt rules deprecated?

你说的曾经没有我的故事 提交于 2019-12-23 01:36:47
问题 I've seen that the new Firebase documentation doesn't include the Bolt rules section. Anyone know if they are deprecated or unsupported? 回答1: Bolt is a research only project and learning from the language was incorporated into firebase storage security rules (https://firebase.google.com/docs/storage/security/). There is no official support for bolt. 来源: https://stackoverflow.com/questions/37638885/are-firebase-bolt-rules-deprecated

Firebase lazy load

≡放荡痞女 提交于 2019-12-23 01:29:27
问题 I'm trying to lazy load firebase items to later on load more of them whenever user reaches end of div container. When i remove .endAt() and .startAt() i'm receiving the 15 items though they are not beeing incremented and it's stuck at these 15 items. When i keep .endAt() and .startAt() i'm receiving firebase warning Using an unspecified index. Consider adding ".indexOn": "title" at /items even though .indexOn is set. I'm confused by that warning. Thanks in advance for any help. Firebase

Firebase lazy load

余生长醉 提交于 2019-12-23 01:29:00
问题 I'm trying to lazy load firebase items to later on load more of them whenever user reaches end of div container. When i remove .endAt() and .startAt() i'm receiving the 15 items though they are not beeing incremented and it's stuck at these 15 items. When i keep .endAt() and .startAt() i'm receiving firebase warning Using an unspecified index. Consider adding ".indexOn": "title" at /items even though .indexOn is set. I'm confused by that warning. Thanks in advance for any help. Firebase

firebase rules: how to restrict access based on user role

前提是你 提交于 2019-12-23 01:24:43
问题 I'm new to Firebase and trying to understand the security rules. For this I'm implementing typical functionality of Project - Team Members - Tasks. Each project will have a team leader, multiple members and multiple tasks. Here is the structure and rules that I'm trying to implement (a.k.a. Requirements): /Members - each member has { displayName, email, emailVerified } any logged in user should be able to read data from Members (to get the display names of all users) any logged in user should

Not receiving APNs when out of app

末鹿安然 提交于 2019-12-23 01:05:21
问题 I am using Firebase as my backend and I am using Cloud Messaging for Push Notifications , but my app receives notifications only when the app is open (and Push Notifications do not display when the app is open). I have checked out the Firebase docs and other code examples and I cannot find anything specifically I am missing, and I am receiving the correct output when the app is open. The issue is that no notification appears when outside of the app and no notification banner shows up at all,

Not receiving APNs when out of app

点点圈 提交于 2019-12-23 01:04:47
问题 I am using Firebase as my backend and I am using Cloud Messaging for Push Notifications , but my app receives notifications only when the app is open (and Push Notifications do not display when the app is open). I have checked out the Firebase docs and other code examples and I cannot find anything specifically I am missing, and I am receiving the correct output when the app is open. The issue is that no notification appears when outside of the app and no notification banner shows up at all,

Like button in Firebase swift

天大地大妈咪最大 提交于 2019-12-23 00:25:18
问题 I am trying to create a like button for my UITableViewCell. What I have managed to do so far is update the number of likes with +1 everytime the button is clicked. I, however, only want the user to be able to press the button once, and if it is clicked again by the same user, the user is unliking the post - just as the facebook like button. If it is any help, I am signing in to my app via facebook. My code: @IBAction func likeTapped(sender: AnyObject) { //print(pathDB) FIRDatabase.database()

Rule for Firestore that enforce user to write a document with id equals to its own uid

隐身守侯 提交于 2019-12-22 19:47:11
问题 I would like to guarantee that an user can only add a document that has the same id that its auth.uid. For example, an user with id 1X0T6xC6hhRN5H02zLCN6SQtwby2 can only create/update the document /salesmen/1X0T6xC6hhRN5H02zLCN6SQtwby2 . At app level, it's done by the following command (both for create and update). this.db .collection("salesmen") .doc(user.uid) .set(data) .then(function() { //... At Firestore level, I am trying the following rule, but it's not working (it results in Error

Swift Firebase Access child snapshot data

孤街浪徒 提交于 2019-12-22 19:42:35
问题 I am currently trying to access data from a child snapshot in Swift. Here is my code that I have (which worked before the Swift 3/Firebase update): if let achievements = snapshot1.childSnapshotForPath("Achievements").children.allObjects as? [FIRDataSnapshot] { if achievements.count != 0 { if let val = achievements[0].value!["somevalue"] as? Int { self.dict["somevalue"] = val } } So what I am trying to do here, is to create a variable of a child snapshot (achievements), and access child

Firebase - Deep Query orderByChild with equalTo

[亡魂溺海] 提交于 2019-12-22 18:45:15
问题 I am trying to grab every project by the members within them -- I've created a sample datastructure though the actual structure is much larger (as in it would be difficult to restructure the database). Here is my query: var ref = new Firebase(FBURL + '/chat/meta/project'); var email = 'kerry@email.com'; ref .orderByChild("email") .equalTo(email) .on("child_added", function(snapshot) { console.log(snapshot.val()); } ); It is important to note that if I remove the .equalTo(email) that it