Search code examples
iosobjective-cswiftcocoa-touchuilocalnotification

Adding actions to UILocalNotification in iOS 10


I have an app that sends push notifications to the user.

I want to add to every notification 2 buttons (actions), I think it's called Rich Notifications.

I didn't find enough information on how to do it, so I would really appreciate if someone could guide me here.

Thanks!


Solution

  • You need to add a notification category and the category will have notification actions. Those actions will define what the buttons say and what gets passed to your app when the user chooses one.