Skip to content

Commit

Permalink
Update app badge with UNUserNotificationCenter
Browse files Browse the repository at this point in the history
This is due to UIApplication being deprecated in iOS 17.
  • Loading branch information
matthewrfennell authored and tmolitor-stud-tu committed Sep 3, 2024
1 parent 4c9528f commit 3efbca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Monal/Classes/MonalAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ -(void) updateUnread
if(unreadMsgCnt != nil)
unread = [unreadMsgCnt integerValue];
DDLogInfo(@"Updating unread badge to: %ld", (long)unread);
[UIApplication sharedApplication].applicationIconBadgeNumber = unread;
[[UNUserNotificationCenter currentNotificationCenter] setBadgeCount:unread withCompletionHandler:nil];
}];
}

Expand Down

0 comments on commit 3efbca6

Please sign in to comment.