Settings

Theme

Stopping background applications on iOS 4

whereoscope.wordpress.com

16 points by mickdj 15 years ago · 17 comments

Reader

credo 15 years 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.

  • mickdjOP 15 years ago

    Thank you for that - I have updated the post to more clearly identify the subset of apps I was talking about.

  • mickdjOP 15 years ago

    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.

    • saurik 15 years ago

      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.

      • mickdjOP 15 years ago

        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.

    • binaryfinery 15 years ago

      Linky?

      • mickdjOP 15 years ago

        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.

jackowayed 15 years ago

> Settings->General->Location Services

This is one of the reasons I was so glad to ditch my iPhone. They bury shit that you want to access frequently in Settings.

Want to turn your WiFi on/off? It's 2 or 3 menus deep in settings. Same with brightness. I change both of those several times a day.

And there's nothing you can do about it unless you jailbreak your phone.

On my HTC Droid Incredible, I have a power control widget that lets me turn on and off wifi, GPS, and bluetooth, and lets me toggle between 3 brightness settings. It only takes up 1/4 of a home screen. It's wonderful.

  • mitjak 15 years ago

    Wifi has always been accessible from the very first menu of Settings.app.

  • sjs 15 years ago

    So true. I still like my iPhone (jailbroken, sbsettings ftw) but I complained about this exact same thing long ago around 2003 when I had one of those badass HTC phone-PDAs[1] with Windows CE. Quick 1-2 tap access to that stuff is a must for me, and some of my less geeky friends. It's a pretty glaring omission to an otherwise excellent OS.

    [1] http://en.wikipedia.org/wiki/HTC_Blue_Angel

    I don't have good ideas about where that UI might be though. Sliding across the status bar like sbsettings? Another pane like the new music controls? On the search page? There's got to be an elegant way to do it.

  • mickdjOP 15 years ago

    I'm curious about this - I've seen that behavior with Android users as well.

    Why specifically do you want to turn WiFi, GPS, and bluetooth on or off? I can think of several potential reasons, but would like a user's perspective.

    • sjs 15 years ago

      Sometimes WiFi is flaky and turn it off in favour of 3G (maybe the router needs a reset, or cable internet is out).

      For some unknown reason Scrabble recommends that you turn WiFi off and BlueTooth on to play multiplayer w/ an iPad as the board. It's an odd request but I do it anyway.

      When I leave the office my iPhone can see the office base station even when I'm kitty-corner waiting for the bus, but the signal isn't strong enough to work so I have to turn WiFi off.

      In order to check my wireless usage w/ Rogers' iPhone app they require me to be on 3G. It's lame but that's how they roll so I have to go along with it.

      Sometimes once it's off I forget about it because I have a 6G data plan which I haven't been able to burn up even using Grooveshark for a couple of hours a day. Then if I want to do something on a LAN at home or work I need to turn WiFi on.

      I leave 3G and BlueTooth on all the time. Some of my friends turn BT off when they're not using it and I try not to hassle them about it. It doesn't wear your battery down unless you're using, in my experience anyway. So less savvy users want to do this kind of thing too, not just us nerds. :)

snprbob86 15 years ago

It's pretty easy to force quit an application on iOS 4:

1) Hold the power button until the power-down slider shows up

2) Hold the home button until the application exists

  • clord 15 years ago

    3) double-tap home, then hold finger on app you want to terminate. the icons in the task switcher start to dance. click the terminate button.

    • snprbob86 15 years ago

      My numbers were steps, not alternatives.

      As for your approach: I've seen that fail for locked up apps. I believe that sends a normal quit signal instead of force terminating the app.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection