2

How to manage/display iOS badge number that calculate by myself like [UIApplication sharedApplication].applicationIconBadgeNumber = 1;?

For now, MarketingCloudSDK will override the result - display unread messages when the app goes to the background.

2

The MobilePush SDK will control badging if the Inbox functionality is enabled in the configuration for the SDK.

If you do not need inbox, set "inbox":"false" in the configuration file and you'll be able to set the badge.

If you are using inbox, you can attempt to set the badge in a delayed fashion in your app's background notification hander. A short dispatch_after in your own handler for UIApplicationDidEnterBackgroundNotification (maybe 1 second) which would then call setApplicationIconBadgeNumber for their own value.

This is untested but should be sufficient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.