I am trying to create 3 conditions using 2 buttons on the local notification : a) Ignore button pressed, b) View button pressed, and c) Neither is pressed. I plan to have my app respond for both a) and b), but not for c). As it is standard to move my app to foreground when View is pressed, I want to change one variable in the background when Ignore is pressed. But I don’t know how to get my call back function for (IGNORE) button started? In another way, how can my app distinguish between user pressing the IGNORE button and user not pressing any button on the notification.
Can anyone suggest a way to do it?
All notifications, wether local or push, are handled by iOS and not your app. Thus you can’t check wich button the user clicked.
Your app will only be notified if the user choice to view the notification and your app is started.