David Robertson
David Robertson

Reputation: 1581

Wake up your app from a local notification action - Swift

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!

Upvotes: 0

Views: 999

Answers (1)

Mathew Spolin
Mathew Spolin

Reputation: 371

didReceiveRemoteNotification is called when you receive a push notification via APNS. You should be using a handler for didReceiveLocalNotification in your AppDelegate.

Upvotes: 2

Related Questions