How to customize firebase push notification message on IOS client - ios

I have built push notification triggered by Firebase database change. Everything is working fine. However, I want to customize message on client side.
Is there any way to customize Firebase push notification message on the app programming?

Related

iOS push notification to remove delivered notification

I'm working on a app project that uses react-native and FCM Push Notification (rnfirebase 5.6.x).
I send a notification when the user receives some message and I need to remove that delivered notification if the user reads that message on another source (like our web app).
With the app open or in background, I can send another push with some userInfo to let me know what I need to remove.
Everything is working perfect... Except when the user kill the app. Then I have no control on the received notification...
I tried the use the tag prop on the notification data, but according with firebase, it is for Android only.
Any ideas on how to do that?

Automatically open app when receive push notification for FCM (Flutter)

I'm trying to make the app open automatically when it receive the push notification, i am using Firebase Cloud Messaging and i've already read here about the same problem but i don't quite understand on how to use it for flutter
It's not possible to automatically launch the app once a notification has been received from Firebase Cloud Messaging. As mentioned in the docs, payloads received while the app is in the background can only be handled when the user taps on the notification.

Scheduled Notifications with Firebase and background running

I want my Firebase to send scheduled push notifications to all the users of my application and if the app is in the background; run some code and send some stuff to the server.
I'm a bit lost because it's impossible to do so with the notification console from Firebase.
Then, I was interested in Firebase Cloud Messaging, but in the documentation, it says that the connection to FCM should be ended :
When your app goes into the background, disconnect from FCM
-Source
What can I do? Should I take a look at services like Parse? Any help is greatly appreciated.
Notification messages don't execute your application code when your app is in the background. All messages sent from the Firebase console are Notification messages. So you can't currently use the Firebase console for what you are describing.
However you can send Data messages from your app server which can trigger background execution of code. You will have to manage the scheduling yourself on your app server.
I solved my problem building a server where the user register his token (unique identifier) to a database. There is also a PHP script for sending push notifications. You can find all of this here.
I edited the PHP script to send a payload which contains :
["content-available"] = "1"
This payload will trigger what you want to do when your app is in the background.
I used a crontab on my server to regularly send push notifications.
The notification console from Firebase can send push notification but not silent push notification that we want in my case.

Unable to receive parse.com notification with API

In my iOS app I'm using parse.com as framework to send push notification. On server side we are using the parse.com rest API to generate a notification.
When I generate the notification by using this: https://www.parse.com/apps/(appName)/push_notifications/new the device receive the notification, but when I try to generate the notification by using the custom solution on my server the device doesn't receive any notification.
I looked on this page: https://www.parse.com/apps/(appName)/push_notifications and I saw the notification from API worked like the notification I ended from the parse service.
Why it doesn't work when I create the notification by my custom server?
Can you help me?
Thank you

Using Firebase to send and receive push notification for an iOS app

I am create a firebase based chat application for iOS. One of the features is to send push notification to the users in the same chat room (if they are offline).
I can't find a firebase function (for iOS) that can be used to send push notifications to the user.
Is it possible?
Displaying alert badges and notifications on iPhone applications is accomplished through Apple's Push Notification system. Since the application is not running on the user's phone when they receive notifications, the APN will have to be triggered from your server-side code.
You'll probably want to create a server-side module that listens for changes to your chat Firebase. When a message appears for a user that is offline, you'll have to schedule a remote notification with the APN. That latter part has nothing to do with Firebase, but has extensive documentation on Apple's developer web site.
I'm not sure if a web application can display alerts or badges. Otherwise this approach will only work if you create a native wrapper for your Firebase chat application.

Resources