0

I want to show a notification (local OR remote) when Application is terminated or killed from background.

There is an App on AppStore which does the same thing. But, I don't know I can provide link to that App here or not.

I tried creating a local notification and setting up it in:

func applicationWillTerminate(_ application: UIApplication) {

}

But, this function does not get called, as mentioned in THIS & THIS links.

Is there any way I can accomplish this? Can I provide reference App link here?


Edit

This question if flagged as duplicate of the of some other question which doesn't solve my issue.

Reference App -- This is what I am trying to achieve. Kill the app from background and you will get the notification.

Community
  • 1
  • 1
viral
  • 4,168
  • 5
  • 43
  • 68
  • Does your app support background execution?... – Sanman Feb 22 '17 at 05:32
  • @sanman Yes, it does. – viral Feb 22 '17 at 05:33
  • Thats why the method is not working for you.The docs says "For apps that do not support background execution or are linked against iOS 3.x or earlier, this method is always called when the user quits the app." – Sanman Feb 22 '17 at 05:35
  • Possible duplicate of [Local notification on application termination](http://stackoverflow.com/questions/17988245/local-notification-on-application-termination) – mrabins Feb 22 '17 at 05:35
  • You may find your answer here http://stackoverflow.com/a/39921446/6285303 – Sanman Feb 22 '17 at 05:37
  • @mrabins That possible duplicate says it's not possible. Where as I can provide you the reference application where it's happening flawlessly. – viral Feb 22 '17 at 05:49
  • Did you see this? https://developer.apple.com/videos/play/wwdc2011/517/ – mrabins Feb 22 '17 at 05:52

0 Answers0