My app schedules a local notification with two actions on a specific time. By the time it arrives on the phone (few hours later) my app is already in a suspended state and pressing any action button leads to nothing or simply crashes the app.
In documentation i've read that didReceiveRemoteNotification
method works for handling such tasks and waking up the app from the suspended state, but i have no idea how to implement it properly for actions.
Thank you!
didReceiveRemoteNotification is called when you receive a push notification via APNS. You should be using a handler for didReceiveLocalNotification in your AppDelegate.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.