Reputation: 361
I have a problem with my iOS Application.
When I kill the app from the iOS Taskbar the WillTerminate
Event is not called....any ideas why?
The only background service i have setup is the voip SetKeepAliveTimeout Timer (with the "voip" flag in the info.plist). But even if I take this one out the WillTerminate
event is never fired.
I also register for SignificantLocationChanges on DidEnterBackground
event.
Any ideas?
Thx
Upvotes: 1
Views: 1734
Reputation: 2541
WillTerminate
will not be called on devices and iOS versions supporting multi-tasking (introduced with iOS 4). With iOS 4 the app is only sent to background and if you kill the app from the taskbar, it is actually killed without getting any callback. Still an app can opt-out from the process of being sent to background and then recieve ..terminate events, but also loose its ability to stay loaded in RAM. For opting-out the key UIApplicationExitsOnSuspend
has to be set within info.plist
.
For a longer explanation check this great article about iOS 4 Backgrounding and Delegate Messaging
Upvotes: 5