I am trying to set the notification badge counter in my app when the app is in background/terminated?
But I'm not getting any clue how should I set the badge counter .
In foreground it's fine I can update notification badge counter.
Now I tried to use the background service by adding content_availbe key in firebase payload and invoking the following method:
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
But my this method is not invoked although i've included content_available key to 1 in my payload.
Has anyone been able to set the notification badge counter when the app is in background with fcm messages?
**NOTE: ** I am concerned about updating push notification counter from app not from the server. Can we update app badge counter from background execution ??
Any help.