Skip to content
Back

Problem marking Apple Push-Notificaton as "mutable-content" for increasing the app-icon-badge count

  • 0
  • Self Hosted
  • Functions
  • Messaging
  • Apple
Eric
8 Aug, 2025, 15:11

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

TypeScript
                    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.
TL;DR
Developers are struggling to mark Apple Push Notifications as "mutable-content" for increasing the app-icon-badge count. The issue arises from utilizing the Appwrite function for iOS app notifications. The "Push Notification Service Extension" seems to be the solution, but the "contentAvailable" input parameter is not working as expected. In the provided code block, the specific parameter for badge count is missing. To manage notifications effectively, developers need to ensure the correct marking and payload modification in their Swift code.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more