Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase -'isDirectChannelEstablished' is deprecated: FCM direct channel is deprecated, please use APNs channel for downstream message delivery

I just uploaded my Firebase pods and got this warning message:

'isDirectChannelEstablished' is deprecated: FCM direct channel is deprecated, please use APNs channel for downstream message delivery

Warning appears here:

Messaging.messaging().shouldEstablishDirectChannel = true

How can I remove this warning?

like image 739
Lance Samaria Avatar asked Mar 03 '20 00:03

Lance Samaria


People also ask

Does FCM uses APNs?

Hence, FCM uses APNs to deliver messages when the message contains user visible payload, e.g., body, sound etc. FCM also delivers via APNs when content available is set.

What is FCM & APNs?

Pusher relies on Firebase Cloud Messaging (FCM) for Android, and Apple Push Notification service (APNs) for iOS to deliver push notifications on your behalf.

Can iOS use FCM?

Stay organized with collections Save and categorize content based on your preferences. For Apple client apps, you can receive notification and data payloads up to 4000 bytes over the Firebase Cloud Messaging APNs interface.


1 Answers

It sounds like you should just remove that line. According to the API documentation:

When set to YES, Firebase Messaging will automatically establish a socket-based, direct channel to the FCM server. Enable this only if you are sending upstream messages or receiving non-APNS, data-only messages in foregrounded apps. Default is NO.

So, unless your app is doing either of the things described here, it's not necessary. According to the release notes:

Deprecated FCM direct channel messaging via shouldEstablishDirectChannel. Instead, use APNs for downstream message delivery. Add content_available key to your payload if you want to continue use legacy APIs, but we strongly recommend HTTP v1 API as it provides full APNs support. The deprecated API will be removed in Firebase 7 (#4710).

like image 93
Doug Stevenson Avatar answered Sep 19 '22 13:09

Doug Stevenson