Invertase: Firebase Cloud Messaging (FCM) with iOS devices - ios

I'm trying to use push notifications on iOS devices with react-native.
I'm using Invertase and I managed to make them work on Android.
The only things I'm doing are:
ask for the permission with messaging().requestPermission(); and registering a token with
firebase.messaging().getToken()
I can get a token on both devices. However when sending them with admin.messaging().sendToDevice
does display the notification on Android but not on iOS although I don't get any error for both.
What Am I missing? Is there something more to do to handle notifications on the iOS part? Do I have to use zo0r/react-native-push-notification or wix/react-native-notifications?
Could you provide a push notification code example working on iOS with Invertase?

Related

iOS Firebase Push Notification - Token received but push not working

I am currently developing an App with push notifications using Capacitor. I followed their guide for the implementation online and everything works so far. I am receiving a token & it is successfully sent to my backend. The problem I am facing right now is that when I try to send a push to that deviceToken via firebase admin SDK the push never reaches my phone (the same is true, when I try to target the whole iOS platform via Firebase Cloud Messaging).
I am not sure why I don't receive any pushes (I have tested it on 2 different devices -> both receive their pushToken, but none of the receive pushes, everything works just fine on android). Do you have any ideas what the problem might be here?
you should enable the capability of push notification and enable background mode such as:
!(https://i.stack.imgur.com/DGZ7h.png)
!(https://i.stack.imgur.com/z7ITq.png)
and you should go to your
firebase project settings/cloud messaging/
add or insert your APNs Authentication Key
from apple developer account

Firebase Cloud Messaging and IOS strengths and weaknesses

I have built an application using phonegap. So far, all of the application features work in both Android and IOS. Now, I would like the app to receive push notifications.
I plan to use Firebase but a friend has warned that FCM can only send push notifications to IOS if a user manually types a message into the FCM console (As in there is no API which would allow my server to send push notifications to IOS manually). The docs haven't helped me prove or refute this warning. Can anyone tell me if I can programmatically send push notifications to IOS using Firebase?
Yes, it is possible to send messages to iOS through Firebase Cloud Messaging through its (server-side) API. You can either just target iOS devices, or send a message to both iOS and Android devices with specific details for each platform.
For full documentation, see https://firebase.google.com/docs/cloud-messaging/send-message.

iOS push notification using FCM

Currently we are using AWS for sending IOS push notifications and FCM for Android notifications. As FCM also supports IOS notifications, we want to consider that for 2 reasons
It is free service (AWS is not that costly)
to have single interface from app server for push and web notifications
but from FCM documentation, it looks IOS app has to be tightly integrated with FCM API for delivering push notifications (this is not required for AWS). so i want to know if there is a way I can send push notifications without any change to iOS app code.
The iOS app must be configured to receive messages from the FCM Servers.
You'll have to implement the necessary functions (callbacks specifically) in your client app that will handle/receive the messages as mentioned in the Setting Up a Firebase Cloud Messaging Client App on iOS.
It's also through implementing the needed functions you'll be able to generate a token needed by the FCM servers to send a message towards the device(s).

How to read push notifications from other apps in iOS

I wanted to know how to be able to read and get the contents of another app's push notification in iOS. Such as a push notification from Facebook Messenger, or Twitter.
I know this is possible because that is exactly what the Pebble Smartwatch iOS app does. It intercepts the push notifications of the iPhone and sends them to the smartwatch over Bluetooth.
Devices such as the Pebble, use the ANCS service with Bluetooth. An app cannot directly access the notifications for/from other apps.

Push notification through Appcelerator not delivered to the iPhone device

I'm using Appcelerator's cloud services to send push notifications.
I'm sending notifications from both their web admin console as well as using their REST API. 2 iOS devices successfully subscribed, and i sent them notifications, but the devices never get the notification.
All ceritificate and provisions on Apple's dashboard seems correct. all Appcelerator's cloud responses seem successful, but still the notifications never display on the devices.
Any ideas?
Thanks

Resources