My app inserts an entry in Core Data when it receives local notifications.
This works fine in the following scenarios.
- App is running and visible.
- App is in back开发者_运维问答ground or not running at all, but when "View" is tapped on receiving notification.
But if I click on "Close", no entry is made. I've added the insert method in the "didReceiveLocalNotification" and "didFinishLaunchingWithOptions" of the AppDelegate.
Can anybody elaborate on what method will be called if we close a notification?
As far as I understand, tapping "Close" on a local notification will just close the notification and not call the app.
But can't you insert your data when you send the notification?
精彩评论