Reputation: 97
So i installed firebase with adding the "google-services.json" in the App_Resources/Android folder.
After that i used the cli for the cmd: "tns plugin add @nativescript/firebase". And it was successfull.
But if i try to use "firebase.firestore()" i get the message that firestore is unknown.
Yes i have ticked yes in the installation as it asked me if i want firestore.
So it should be useful but it is not. I deleted the "firebase.nativescript.json" and run the 'npm run config' command in the android folder but it didnt help. Then I uninstalled the plugin with "tns plugin remove @nativescript/firebase" and re-installed it. Nothing works. Here is my fire in @nativescript:
Is there a Solution?
Upvotes: 0
Views: 305
Reputation: 1415
You should be able to import firestore
directly from @nativescript/firebase
and access its properties that way
import { firestore } from '@nativescript/firebase';
// firebase.firestore().collection('user') becomes the following line
firestore.collection('user')
Upvotes: 1