EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 444 forks source link

usePublicVapidKey ? #1561

Closed saschaarthur closed 4 years ago

saschaarthur commented 4 years ago

Hello,

All this firebase stuff GCM/FCM VAPID whatever is kind of confusing if you dont know it yet. (because most of the stuff is deprecated outdated or whatever)

Currently i need to get "vapid" (in combination with FCM?) running and it seems what i should do (based) on the google doku (https://firebase.google.com/docs/cloud-messaging/js/client) is:

// Retrieve Firebase Messaging object.
const messaging = firebase.messaging();

// Add the public key generated from the console here.
messaging.usePublicVapidKey("BKagOny0KF_2pCJQ3m....moL0ewzQ8rZu");

Heres also the header for it: https://firebase.google.com/docs/reference/js/firebase.messaging.Messaging#usepublicvapidkey

It seems on this version here of firebase its missing, any idears how i get this running in combination with this nativescript plugin?

On subscribe i should get more information (subscription object?) then only the token..

EddyVerbruggen commented 4 years ago

I haven't heard of a vapid until now, so for sure it's not currently part of the Firebase plugin API.

Can you share a link to the iOS and Android SDK docs (not the JS one)?

saschaarthur commented 4 years ago

Hey thanks for the rapid answer.

This is the confusing part for me, shoudlnt this vapid related stuff (especially also because firebase allows to set this protocol verify within their UI) be supported then for android/ios as well?

Didnt realized theres an android/ios selector in the menu on the left, but the vapid features seems no be listed there.

Is it a feature which is only valid for web atm ?

manojdcoder commented 4 years ago

Not exactly, turns out Vapid Key is something you use only on FCM Web. Its platform specific, not going to / have to be part this plugin.

saschaarthur commented 4 years ago

Thanks for making this clear, will close this now.