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?
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.
Pusher relies on Firebase Cloud Messaging (FCM) for Android, and Apple Push Notification service (APNs) for iOS to deliver push notifications on your behalf.
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With