Hallo experts,
I've tested what's happing with my app when the iPhone is switched off while the app is active. For this purpose I logged the callback methods of the app's lifecycle in the xcode debugger console.
The result was: When I press the on/off button of the device for some time applicationWillResignActive
is called. The iPhone shows an option to switch off the device on the screen. If I ackknowlege to switch off, the iPhone shuts down. But apperently no further callback methods like applicationDidEnterBackground
or applicationWillTerminate
are called. As result all data would be lost if I don't save it in applicationWillResignActive
. Although the iOS Application Programming Guide says, one should save an app's data in applicationDidEnterBackground
and applicationWillTerminate
.
What do you think, is one of the two methods still called and is only not printed in the console anymore?
Best regards