Reputation: 656
I have a custom Notification Extension in my application and in the notification view I have several images that represent different categories and when those categories are clicked I need to communicate which button was clicked so that the application can update and store the response. I am unclear how I can relay the response to the application. I previously was using UNNotificationAction items to show the list of categories and that would create a response to the delegate I had set. Is there a way to have a user click a button in the notification extension and have a delegate in the application be called, possibly by responding with an action identifier? Can I dynamically add a Notification Action to the notification after it is displayed?
Upvotes: 0
Views: 387
Reputation: 5823
In iOS 12, you can interact with control of notification extension UI, but before iOS 12 you must provide notification action to perform your operation.
For iOS 12, you can enable user interaction with control in notification extension by adding UNNotificationExtensionUserInteractionEnabled
to YES
in Info.plist
Upvotes: 1