EddyVerbruggen / nativescript-plugin-firebase

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

Firebase Messaging iOS Direct Channel Deprecation #1609

Closed JessicaBunyan closed 4 years ago

JessicaBunyan commented 4 years ago

Hiya,

I, and I'm sure many others received an email from Firebase today regarding the deprecation of the iOS Direct Channel API.

Firebase Messaging iOS Direct Channel has been used for sending data to apps when they are in the foreground and for upstream messages. The Firebase Messaging iOS SDK v7.0 (slated to be released in September 2020) will no longer support the iOS Direct Channel API. Your app will break if you update to the Firebase Messaging iOS SDK v7.0 without migrating off the iOS Direct Channel API.

My question is simply whether this deprecation will affect this plugin and any apps we have built that use it?

Attached: Full email from Firebase firebase-message

Many Thanks

EddyVerbruggen commented 4 years ago

Anyone reading this willing to investigate?

felixkrautschuk commented 4 years ago

@EddyVerbruggen @JessicaBunyan I also got this email and I think everyone using the cloud messaging functionality of this plugin will get this email, because the following line of code is always executed:

https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/messaging/messaging.ios.ts#L256

felixkrautschuk commented 4 years ago

I just commented that line for a short test and the push notifications seem to keep working for us on iOS.

Maybe that's because we are not sending data-only messages or non-apns messages, as stated here

kanclalg commented 4 years ago

We are also sending only downstream messages and I can confirm that it is working just fine when that line is commented. And seems like @felixkrautschuk is right about that specific line triggering these emails. https://stackoverflow.com/questions/60498519/firebase-isdirectchannelestablished-is-deprecated-fcm-direct-channel-is-depr @EddyVerbruggen was there any specific reason why that line is added there?

flore2003 commented 4 years ago

The line @felixkrautschuk has mentioned was introduced in https://github.com/EddyVerbruggen/nativescript-plugin-firebase/commit/93f4477f2c925ef115b22910826c5251dc35823a witht he upgrade to Firebase iOS SDK 6.2.0, however, it only replaced code that used the deprecated API to connect to the direct channel (https://github.com/firebase/firebase-ios-sdk/pull/2717), which was originally introduced in https://github.com/EddyVerbruggen/nativescript-plugin-firebase/commit/7108cb293d60ca37c32386c72ebf331986ffa9e8

From my preliminary research and looking at the code, it seems like it is connected to the handling of foreground notifications. @felixkrautschuk @kanclalg Can you check if you still receive foreground notifications when the line is removed?

felixkrautschuk commented 4 years ago

@flore2003 thanks for your investigations. I just re-tested cloud messaging for foreground/background/killed state after commenting that line (shouldEstablishDirectChannel = true) and everything is still working as expected on our side.

shahen94 commented 4 years ago

any news on this ?

shahen94 commented 4 years ago

@EddyVerbruggen PR is open and ready for review.

https://github.com/EddyVerbruggen/nativescript-plugin-firebase/pull/1641

lostation commented 3 years ago

Hi Eddy,

I'm still used nativescript-plugin-firebase v10.5.2...cause I'm stucked with NS6.

And I've also received the same above mail from Firebase some months ago and recently a new one from Apple this time... And I'm a bit lost of what I'm supposed to modify...

Firebase : .... We are removing this feature in favor of natively supported messaging features provided by Apple Push Notification Service. ....

Apple: The HTTP/2‑based Apple Push Notification service (APNs) provider API lets you take advantage of great features, such as authentication with a JSON Web Token, improved error messaging, and per‑notification feedback. If you still send push notifications with the legacy binary protocol, make sure to upgrade to the APNs provider API as soon as possible. APNs will no longer support the legacy binary protocol after March 31, 2021.

So what does it means ? Is there some changes I have to make ? Your lib will still continue to work for simple notification ?

Another question...I've always wonder... from the developer.apple.com account, into the "Identifiers" page... Do I need to check the checkbox push notifications or not ?

image

Thanks Lo.

lostation commented 3 years ago

It's always nice to not receive any answer for 17 days...