I'm using actionable notifications. Following data coming from backend :
- notificationId (String)
- notification title, body
- two dynamic titles to show action buttons
I'm registering actions against the notificationId like this :
let notificationCategory = UNNotificationCategory (
identifier : notificationId,
actions : [actionPositive, actionNegative],
intentIdentifiers : [],
options : []
)
UNUserNotificationCenter.current ()
.setNotificationCategories ([notificationCategory])
How to deal with multiple notificationCatagories because setNotificationCategories() unregisters all existing catagories to register the new ones(i.e. overriding by new ones).
I'm facing problems to show notifications with diffrent dynamic actions. There is not a single blog/code I found to do this.