iOS 11: CKModifyBadgeOperation is deprecated

in iOS 11, I noticed that I got a compiler warning when I tried to use CKModifyBadgeOperation to reset the badge number to zero.

'CKModifyBadgeOperation' was deprecated in iOS 11.0: No longer supported, will cease working at some point in the future

What is the alternative to this operation?

Is it safe to keep using it till an alternative is officially released?

I'm equally curious to get an answer to this question. Whatelse should we do with CKModifyBadgeOperation no longer available? I haven't been able to find any answer...

Anyone have a solution to this seemingly inappropriate deprecation?

Bump.


Does anyone know how to reset the badge number if you want the badge to indicate the number of notifications that were sent to the app since the last time the app was opened? If you just reset it to 0 on the device without using CKModifyBadgeOperation then the next time CloudKit sends a notification the number displayed is the old number plus 1.


Error message is: 'CKModifyBadgeOperation' is deprecated: first deprecated in iOS 11.0 - No longer supported, will cease working at some point in the future

This is still an issue. If CloudKit increments badge count then even using the 'new' [[UNUserNotificationCenter currentNotificationCenter] setBadgeCount:0 withCompletionHandler:nil]; doesn't work. And now CKModifyBadgeOperation no longer works.

see https://stackoverflow.com/questions/47542005/ckmodifybadgeoperation-is-deprecated-in-ios-11-anyone-know-an-alternative-appro for a work-around. Apple's methods do not reset the badge count on CloudKit.

iOS 11: CKModifyBadgeOperation is deprecated
 
 
Q