I have looked through the Backendless support pages and there seems to be a number of different tickets regarding this issue: here, here, here etc.
The general answer seems to be to add your badge number to the push payload in the format:
@"badge" : @N,
In some answer this link has been referred to for incrementing: https://backendless.com/documentation/utilities/ios/ut_atomic_counters_ios.htm
All of these answers seem to be pointing towards knowing the notification value when you send the push.
We are using Backendless for our chat component meaning that when you send a user a message it should increase their current notification number by 1. This means we can’t send a value as the calculation will take place depending on their device.
I have looked at using the atomic counter increment but the article isn’t particularly clear.
id <IAtomic> myCounter = [backendless.counters of:bBadge]; NSNumber *result = [myCounter incrementAndGet];
If I calculate the number before I send the push then it will not calculate the other user’s notification value.
Currently the function
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
isn’t being called when we receive a notification meaning that I can’t use this to set the badge number.
Is there a way to effectively increment the other users badge number through push notifications? Is it integrated into the test project or anywhere that I can use to get it working in our project?
Any help on this would be very appreciated,