Hacker News new | ask | show | jobs
by credo 5681 days ago
>>But how do you stop an application from running in the background?

Delete it. Seriously, that’s the only way.

>>If you hold down the icons until they start to wobble and then tap the red X, you have terminated that application. >>But applications get restarted when: the phone reboots

I think this is mistaken.

I haven't verified this in code yet, but my impression is that the app will not be restarted automatically on a reboot.

After you reboot the phone, you will be able to see previously run apps in your list of "recently run apps" (by pressing the Home button twice). However, this doesn't mean that the app has been restarted. You will have to tap the app-icon to get it to start.

[Edit] Thanks for the clarification below about needing to call startMonitoringSignificantLocationChanges. You may want to add this detail to the blog post because the current wording suggests that all background apps get restarted on a reboot.

2 comments

Thank you for that - I have updated the post to more clearly identify the subset of apps I was talking about.
You have to have asked for the Significant Location Update Service.

I have verified this in code numerous times, and Apple representatives have confirmed in the development forums.

Interesting. I was under the impression that any application marked with the background type "voip" (such as Skype) was started by SpringBoard when it launched.
Yes, voip apps can also be relaunched in the background.

The focus of this article was location-based apps, but there are also interesting behaviors with voip and audio applications.

Linky?
The description under startMonitoringSignificantLocationUpdates at

http://developer.apple.com/library/ios/#documentation/CoreLo...

is the place to start, where they state "If you start this service and your application is subsequently terminated, the system automatically relaunches the application into the background if a new event arrives."

The other required piece of information is that when you reboot the phone, it triggers this event for all applications that have registered this service.

More info at: https://devforums.apple.com/message/307725

If you're further interested, downloading the SongMap sample code from Apple will let you test this functionality yourself.