开发者

Handling Local Notifications when app is in background

My app inserts an entry in Core Data when it receives local notifications.

This works fine in the following scenarios.

  1. App is running and visible.
  2. 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜