We have integrated SFMC Inbox messaging in our iOS application. Whenever we trigger an alert + push inbox message from SFMC portal, badge count on the app icon is incremented by 1.
We mark a message as read by calling sfmc_markMessageRead
function, whenever user reads a message inside the app. (We have a controller to display all the messages (sfmc_getAllMessages
) & a message detail controller)
Scenario :-
- I send 4 alert + inbox message, badge count on appicon is set to 4. (App is killed)
- Now if I launch the app, read 2 messages and then kill the app, badge count on app icon will be set to 2 (unread message count) by the SDK.
- Now if we trigger another alert + inbox message, badge count would be updated to 5. (App is killed)
- Now if I launch the app & kill it, badge count would be updated to 3 ( as we have 3 unread messages).
What I have concluded from my observation is
- Everytime you send an alert + inbox message from SFMC portal & enable update badge count option. Badge count will be equal to number of notifications sent.
- When user launches the app, SDK overrides the badge count & it's set to number of unread messages user has.
Questions :-
Q1) Is there anyway we can tell SFMC server that a message has been read?
Q2) How SFMC maintains badge count at its end?
Q3) How to reset badge count on SFMC portal?
Q4) We want to display badge count as number of unread messages user has. How do we achieve this when app is killed? Is there any out of the box function or config which SFMC provides?
Any help is much appreciated.