Hello, I have location updates running in the background of my app. The updates continue to come through, until I turn the phone off and back on again. Once the phone has rebooted, if I leave the app in the background, the location updates don't resume. Is there a way to resolve this, or are location updates killed when the phone is turned off/on?
Location updates after power cycling device?
What do you mean "if you leave the application in the background" after the phone restarts?
Are you sure the device is actually launching your application into the background after the restart? My understanding was that very few applications (and possibly no Developer applications) get relaunched when the device is restarted.
It's another one of the situations where having the recently used application list double as the interface for killing applications causes some confusion about the device state...
You're right about the confusion with recently used application list and how it has dual purpose. I didn't realize that those apps ever expired as long as they appeared in that list.
So once the phone is shut off, all Developer apps get terminated? I'm assuming that when the device is powered back on, they can't simply resume activity unless the user launches the app.
The iOS device doesn't have non-volative RAM, and it doesn't support paging dirty memory to disk, so when the phone gets shut off there's nothing in memory. When the device is sleeping, on the other hand, there's enough power kept to memory to maintain the contents.
Theoretically, iOS could go through all the work that OS X does for storing previous application states and then restoring them when the device restarts. But if it did so, it would end up with the same horrendously long restart times relative to how long it currently takes to restart an iOS device. It's bad enough waiting for Firefox, mail, and Xcode to restart on a Mac, imagine how frustrating waiting for apps to relaunch on a phone would be like.
Then again, some of the policies were probably first written with all of the assumptions and conditions associated with iOS 2 and iOS 3 and the even more restrictive developer sandboxing. So there's probably room for improvement (and for people to file bug reports requesting enhancements) so that more applications can be automatically restarted or restored.
After all, iOS is willing to kill and then transparently relaunch apps that register for background updates. Adding a softer reboot option would follow along those lines.