PushNotification icon indicating copy to clipboard operation
PushNotification copied to clipboard

Updated the GCM API URL to the FCM legacy URL

Open davebuilt opened this issue 5 years ago • 6 comments

The old URL is no longer working, it redirects to documentation stating that we should use this URL.

Documentation here: https://firebase.google.com/docs/cloud-messaging/http-server-ref

davebuilt avatar May 13 '20 16:05 davebuilt

Hi @Sixfifty ,

The package is already using that endpoint for the FCM service. You can see so here

Edujugon avatar May 16 '20 07:05 Edujugon

Interesting... thanks for the feedback. So can I just interchangeably swap GCM and FCM? I'll try it on my end.

It is probably still worth pulling in this change because the previous URL no longer works and will remain broken.

davebuilt avatar May 16 '20 15:05 davebuilt

What service are you using, FCM or GCM? If you're using FCM, then you don't have to worry since it will use the proper endpoint.

Now, regarding GCM, is that service still available at all? I think it was deprecated in favor of FCM, wasn't it? If that's the case, it might be even worth to get rid of the GCM support to remove confusion.

Edujugon avatar May 16 '20 15:05 Edujugon

I signed up using GCM years ago, I was using a different library (that seems to be abandoned now) so I was migrating across to this one. The old libraries underlying libraries made the URL switch silently to keep those using GCM classes compatible.

This is your choice whether to keep GCM for compatibility or remove it, I've yet to try using the FCM provider instead of GCM but I suspect it will work as it's an extension of GCM. I'll do a test on Monday when I get back to the office.

davebuilt avatar May 17 '20 10:05 davebuilt

Hi @Sixfifty ,

did you get a chance to test that?

Edujugon avatar Jun 11 '20 07:06 Edujugon

Just tested changing my codebase from GCM to FCM it is working.

I only needed to change new PushNotification('gcm'); to new PushNotification('fcm');.

P.S. Sorry it took me a while to get back to you, it's been a busy few months.

davebuilt avatar Jun 21 '20 16:06 davebuilt

Thank for contributing! Closing this one since the URL was changed with some release already. GCM could be marked as deprecated in some future version.

pultho avatar Nov 23 '22 20:11 pultho