I added some button into the iOS Push notification, e.g., I customized the Push Notification Banner/Alerts with some custom buttons, which I'd like to open the app.
Currently when I click the Banner/"Open" button of Alert dialog, the app runs successfully.
I want to add opening app event programmatically.
PS. It's about the interactive Push Notification. And on my research there isn't answer relevant to this question.
Correction as Sudhan points out:
The
UIUserNotificationAction
objects that you are going to add to yourUIUserNotificationCategory
have a methodactivationMode
, it can take constantUIUserNotificationActivationModeForeground
When the user presses the action button, app will launch in foreground and call this method on the
appDelegate
: