Pending messages
Get Pending Messages Count
Once the authentication process is over, we can then request the pending messages to be read by the user using the following method:
func unreadMessageCount(completion: @escaping (Int, MeetingLawyersError?) -> Void)
Update App Badge
So, once we get the result, we can update the application badge icon:
MeetingLawyersApp.unreadMessageCount { count, error in
DispatchQueue.main.async {
if #available(iOS 16.0, *) {
UNUserNotificationCenter.current().setBadgeCount(count)
} else {
UIApplication.shared.applicationIconBadgeNumber = count
}
}
}
Next steps
- Show professionals list: Professionals List
- Customize UI: Customization