Is there a way to get notified (by iOS) that the system is about to shutdown? I'm particularly interested in when the battery is dead and the OS is about to shutdown as a result.
I thought UIApplicationWillTerminateNotification
will do the trick but it doesn't.
Thanks.
The app is running in the foreground. I basically just need to log the timestamp (of when the battery dies) and save to a file just before the device shutdown.