How does Firebase work on Nativescript?


#1

Iv’e already finished the installation process and initialized firebase on my app
but how do I read/write in the database? do I need authentication to do that?
I’ve tried push and setValue but it still doesnt register in my firebase

any suggestions?


#2

Have you seen the second tab in the Realtime DB / Firestore sections? That’s where you can tweak the access rules of your database. By default anonymous writes are not permitted.

To allow anonymous access, set this:

{
  "rules": {
    ".read": true,
    ".write": true
  }
}

#3

I did that but it does go through


#4

Perhaps the best way forward is running the demo app in the Firebase plugin repo:


#5

Thanks for the reply!

I solved it by adding the firebase config.
i didnt have the firebase.nativescript.json file