Why does my app restart by itself after crash

715 Views Asked by At

Ever since the first release of iOS 8 DP, I've seen strange behaviors of my app on all my testing devices running iOS 8. My app sometimes restarts itself automatically after crashes. In a particular case, the app kept crashing and restarting itself endlessly and drained the device battery rapidly which caught my attention. During the investigation of the battery consumption issue, I added some logic in the application delegate so that each time the app launches, it will append a time stamp to the NSUserDefaults, so that I can know exactly when the app launches. The experiments showed that the app did restart by itself when it crashed, however, it's not reproducible every time it crashes.

I've never read anything from any of Apple's documentations that says an app can restart by itself after a crash. I wonder if anyone have experienced similar issue in their apps. Most importantly, how to prevent the app from draining the battery if it keeps crashing and restarting by itself?

0

There are 0 best solutions below