Objective: I am trying to detect when the app shuts down. The applicationWillTerminate is not being called after iOS kills my app.
Question:
applicationWillTerminate is not being called after app is woken app and then subsequently terminated by iOS (it has normally 10 seconds of time) in background by a location event (e.g. entering beacon region aka UIApplicationLaunchOptionsLocationKey). Why is that?
- Test method 1: http://lemonjar.com/iosconsole/
- Test method 2: added UILocalNotifications
Sequence of events:
- app is not running
- beacon is turned on
- app is woken up by iOS
- after a while (10 seconds usually) app stops running
- however applicationWillTermiante method is not being called.