How to modify iOS "notification" payloads in notifee instead of creating Service App Extension?
See original GitHub issueHi everyone, recently I was working with iOS push notification. Here is my apns payload
{
"messageId": "1638966606762796",
"data": {
"avatar": "",
"eventtimestamp": "xxx",
"title": "xxx",
"room_name": "",
"user_id": "xxx",
"priority": "high",
"body": "xxx"
},
"contentAvailable": true,
"mutableContent": true,
"notification": {
"title": "xxx",
"body": "xxx"
}
}
“notification” payloads is meant to be display when app in background. However, I have to modify its “body” to display correct content.
For this, I have to create Service App Extension in swift to handle this “notification” payloads. But it seems not reliable as Service App Extension not working smoothly.
Any idea if I can modify “notification” payload directly in Notifee and avoid the native displaying?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Modifying Content in Newly Delivered Notifications
A notification service app extension ships as a separate bundle inside your iOS app. To add this extension to your app: Select File...
Read more >Remote Notification support | Notifee
Update the message payload, sent via your backend; In a Notification Service Extension in your app when a device receives a remote message....
Read more >Clarification about documentation regarding background ...
I'm finding the docs a bit ambiguous regarding background (push) messaging on iOS. Is it necessary to implement the notification service ...
Read more >Modifying the Payload | Kodeco, the new raywenderlich.com
Make sure iOS is selected and choose the Notification Service Extension. For the product name specify Payload Modification. Press Finish.
Read more >Push Notifications (V2) | Stream Chat - React Native SDK Docs
Make iOS Payload Data Only#. If the iOS payload is made to be data only, then setBackgroundMessageHandler can be used to display notifications...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ohh ok I got it. Will ask my backend team to check on it.
One more question is that, is it a must that iOS will always need “notifcation” payloads?
From what I observe, “notification” will auto shown by iOS itself, the only way to change it is through Notification App Extension.
Is there anyway that “notification” can be modified directly with notifee instead of using Notification App Extension?
Closing as question is answered