I get an instance of null upon the init () promise resolving
Not sure what am I doing wrong followed the guide to the letter.
I can鈥檛 help you without a repo to look at.
Thx! here I posted one - https://github.com/oronoa/starter_ns
looks like none of the interfaces are enabled in the plugin although I did set most to true on the json
Did you try removing the platforms folder after adding the plugin?
I just deleted it and ran > tns debug android --bundle --emulator
still the same, it prints "firebase-.init done" but the instance is null and all the other FB callbacks are never called
Ah, now I see what you mean. You should really ignore that instance returned by the init method (it used to be a reference to the Realtime DB instance). It's more or less a relic from the past, when it made sense to use this plugin with Realtime DB only. Since then, Firestore was added, and you can even use the plugin without using its DB features these days.
I've just removed the instance from the readme accordingly
So unless the plugin is not working otherwise, I don't think there's an issue.
So shouldn't I see Firebase push token being printed ? with the token ?
When I look inside the firebase.android.js code it looks like messagingEnabled() returns false ...
You're right, I wasn't aware that was an issue as well. Let me reopen this and take a look.
Can you make sure it's not just a matter of installing the plugin again? If you've enabled messaging in firebase.nativescript.json after initial installation, then removing the platforms folder and node_modules is required for the plugin to drag in the additional native libraries. The alternative would have been to simply ship all libs by default, but that would be horrible for build times and app size.
Btw, it looks like you've enabled both Firestore and Realtime DB. Make sure that's what you want.
Also, if you like, I have a working clone of your project. If you still have issues plz let me know and give me push permission to that repo.
I added you to that repo, as for the steps let me see if I get this right
enable what I need in firebase.nativescript.json (i just tried to enable everything to be on the safe side)
rm -rf node_modules
rm -rf platforms
tns debug android --bundle --emulator
is that right?
Yes, but you really want to enable only what you need!
ok I did that ... I now get Application has stopped ....
ok, I'm not really sure but after a few remove plugin and rm -rf and reinstalling all now it works ... Thx for your time and help!
Hi
I deleted and reinstalled all but still the same problem.
After init, I can't call onMessageReceivedCallback or PushTokenReceivedCallback.