Problem marking Apple Push-Notificaton as "mutable-content" for increasing the app-icon-badge count
- 0
- Self Hosted
- Functions
- Messaging
- Apple
I was able to set up Push-Notifications via Appwrite function for my iOS App. I now wanted to increase the Badge count everytime the user gets a notifcation. Using the "Push Notification Service Extension" seems to be a common way to do it. I stumbled across the problem to mark the Notification with the payload " "mutable-content":1 " as mentioned here: https://medium.com/@jpmtech/push-notification-service-extension-in-swift-b1a0b68051d6
This is the code of creating the Push-notification mentioned here: https://appwrite.io/docs/references/cloud/server-nodejs/messaging
ID.unique(),
title,
body,
undefined,
recipients,
undefined,
{
key : "xxxx"
},
undefined, // action
undefined, // image
undefined, // icon
"default", // sound
undefined, // Color
undefined, // tag
undefined, // badge
false,
undefined, // scheduledAt
true, // contentAvailable
false,
MessagePriority.Normal
)```
I was thinking the "contentAvailable" input-parameter would do the trick, but it does not. Any idea? With the Appwrite UI i can't even set this option, when creating a Message.
I am able to work with the notifications send via the Apple Push Notification Center, but I am having troubles with the ones sending from my appwrite-function. How do I know? The function in swift would modifying the title of the notification, when it is marked correctly.
Recommended threads
- Provider error when creating a function ...
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...