Reputation: 6676
I usually do the following at night:
1) Have my app running 2) Press the Home button to go and set the alarm for in the morning 3) Lock the screen on my iPod (4th Gen) at night ... 4) Wake up in the morning before alarm goes off 5) Double-press the Home button to go back to my app (or tap the icon on screen) 6) My app restarts from scratch
Question: Why is my app restarting each time? It doesn't do this unless its left for a long period of time.
I've checked with Instruments and cannot see any continuous memory leaks - it seems stable to me - and - I've had a look with Organizer for any crash logs in Device Logs. There are no crashes for days.
Can somebody please tell me what I should be looking for? I'm running iOS6. Is iOS shutting down my app for some reason? How can I tell? Would there be a method or delegate I can implement within my app to find out - or deny this shutdown?
My app uses about 26Meg of heap memory.
Upvotes: 0
Views: 483
Reputation: 189
Please read carefully following documentation: https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html
Section "Being a Responsible Background App" may answer why your application forced to quit
Upvotes: 2