iOS apps that refuse to go away

This issue has been around for a long time, but right now I have an iPhone 13 Pro running iOS 17.5.1 and it’s still observable there. I’ve found that certain apps (Music and TomTom GO spring to mind) don’t quit when I do the usual quitting action on the phone (select and slide). They look as if the have gone, but then they reappear or seem still active.

For example I can set TomTom GO (a navigation app) to get me to a destination in my car, but when I get out of the car I quit the app, only to have it continue to give driving instructions with the app apparently closed, as if I hadn’t quit! I found a workaround, which is to reload the app, tell it to cancel the last journey and quit again. But why didn’t the first quit work?

With Music, I may start to listen to something, and then decide not to continue, so quit the Music app, but the ghost of the track its still there in the Control Centre, and when I press ‘Play’ there the track starts up without opening the app.

I don’t feel I’m in control - what’s going on?

Apps can register themselves for background processing. This isn’t unusual. It’s how (for instance), you can keep talking on a phone call or listening to music without worrying about the app quitting on you (possibly due to you doing other things in the foreground at the time).

Navigation apps typically also fall into this category - as they should, since you usually don’t want to lose your directions as a result of doing other things. (You shouldn’t go playing with your phone while driving, but your passengers might.).

It is kind of awkward when an alleged “force quit” operation doesn’t actually stop all operations, but it makes sense to me.

FWIW, Apple and Google Maps stop navigation after you arrive at your destination. But if you stop before you arrive, you also have to tell them to stop.

WRT the control center, this is something separate from background processing. It remembers the last-used media and lets you play/pause it without explicitly launching the corresponding app. Again, this is generally a good thing because it means you can later just connect headphones and press the play/pause button to pick up where you left off. But I suppose it can be a bit weird if you aren’t expecting it.

3 Likes

To add to what David said, I’ll add that when I force-quit apps that are acting up the system still seems to remember what the appearance was the last time it was open. For example, just the other day I had an app where the settings were frozen, I force-quit the app, and re-opened it, and it appeared that it was bringing me back to the same settings screen, but then shortly after the app flashed and the normal first screen display appeared. I’m sure that iOS does this so that the user isn’t waiting for the app itself to completely paint the display. I’ve noticed the same thing on MacOS after a logout / login or restart when you have chosen to re-open apps.

I think some of Apple’s system-level apps, like the Music app, are treated differently from third-party apps. The Music app is just a view that you use to begin media playing, and that media playing seems to be remembered the next time that you launch the app. That I am less sure of, though.

That’s exactly it. I remember reading Apple press releases all the way back in the days of the first iPhone. iOS periodically saves a snapshot of an app’s screen. When launching the app, it will display this image during the brief time between when you initiate the launch and when the app has a chance to draw its real content.

This is meant to create a more responsive interface. You are less likely to notice the startup delay with this approach than if your saw a generic “loading” icon or something similar.

It’s also meant to preserve the illusion that the app was always running even after you closed it. As you (probably) know, iOS aggressively terminates apps that you’re not actively using, in order to make more system resources available to the foreground app. But you never know exactly when or whether an app was actually terminated. By preserving the screen, the visible behavior is (almost) the same if the app was just suspended or if it was actually terminated.

WRT media-playing apps, I agree. I suspect there are internal system services for playing media that remain active even if the app using those services was quit. So you can pause/resume media (not just from Music - I’ve seen the same with YouTube and the PocketCasts podcast player) without explicitly launching the app. Whether or not the app gets launched in the background when you do this, I don’t know. I suspect it does, since playback continues beyond the first track - it will load the next song/podcast/video as it would with the app running.

2 Likes

I’m surprised to hear that—I’ve never seen an issue there—but I would note that the only reason to force-quit apps is when they’re behaving badly. It’s otherwise counter-productive.

2 Likes

I force quit apps I am no longer using just to make things less confusing.

Well, I don’t force-quit to save RAM - apparently an outdated concept - but in order to render the app inactive. If I want to say to the phone “no more music, thanks”, I don’t see how I can do it via the UI of the app. Similarly I need total quiescence of anything using GPS when I don’t need it, in order to preserve battery life when out and about. Frankly I wasn’t viewing the select-and-slide action as force-quit, but only as the exact equivalent of Cmd-Q on the Mac.

1 Like

I suppose what I find disturbing is the decoupling of the UI - what you see on the screen when the app is in the foreground and working normally - from the executable code of the app. To have the key action of an app (playing music, using GPS…) going on when the UI has been removed seems too much like the ghost in the machine taking control.

Maybe I should rethink my expectations for apps - at my age, it’s always difficult to completely shake off the past: I come from an era when software developers like me thought that running more than one program at a time in a computer was pretty amazing…

This is the critical thing - there is no Quit for iOS and iPadOS apps. Mobile apps have a different paradigm from desktop apps. As Adam suggested, the only true reason to force-quit a mobile app (iPhone and iPad) is when they become unresponsive, they inexplicably use a lot of battery (very rare in my experience) or there is something else wrong. iOS and iPadOS manages background use, and use of system services like location services, for you. In an effort to save battery drain, iOS and iPadOS is very aggressive about shutting down application use of these services.

As for music/media, I simply press the pause control and after a short time the media player control on the Lock Screen and in control center disappears.

2 Likes

It’s not, though, there isn’t an equivalent of Cmd-Q on the Mac. As Adam said, there it’s not best practice to routinely force-quit apps. If you end the route in a navigation app, it will stop using the GPS so there aren’t any battery issues (and you can be confident of this as the location access icon and colour in the status bar disappears).

Surely you press the play/pause button either in the app, control centre, or on the Lock Screen?

Edit: @ddmiller beat me to it :sweat_smile:

2 Likes

Exactly. See Apple’s developer documentation about application life-cycle events:

Apps exist in various state:

  • Not running (never launched, or after termination)
  • Inactive (startup screen, or sitting idle for a while)
  • Active (running)
  • Background (running, but without a visible UI)
  • Suspended (paused by the system after being in the background for too much time or if its resources are needed by something else)

iOS will transition your app between these states as a result of its behavior and how other apps are behaving. Transitioning to the “not running” state (which might come from the background or suspended state) is equivalent to a “quit” operation, but it’s not typically possible to explicitly request this. The swipe-up operation is similar to a force-quit, and is not recommended if you don’t have a specific reason to do it.

And a swipe-up on an app that is already in the “Not running” state does nothing other than removing it from the list of apps (and might purge some of its saved state).

But if your app is running on iOS 13 or later and is using the Scenes API, then you don’t typically handle these events at all. Instead, each scene gets its own set of lifecycle states:

  • Unattached
  • Foreground inactive (e.g. launch screen or idle)
  • Foreground active
  • Background
  • Suspended

Each scene transitions through its own set of states. The system can disconnect scenes in the Background or Suspended state (returning them to the Unattached state) as needed to reclaim resources. In other words, each scene is managed independently, making the concept of if the app is “running” or not a much more fuzzy concept.

This is probably why certain things (like media playback) may continue in the background after you “quit” the app - you probably only suspended some of its scenes, with the playback scene still running in the background state.

At least that’s my current theory. Since I have no experience developing iOS apps (beyond some sample code used in an Apple tutorial), I could be completely wrong here.

1 Like

Thanks - ah, I think you believe I should be content by a “pause” or “stop”, but I want the phone to forget I had this song playing at all (or maybe it can remember it on a list of the last 10 songs or whatever): this is like putting a CD back in its case and putting the case back on the shelf. I can see that the inability to do this is not a show-stopper, it just seems untidy. I mean you will still see the song you selected to play at the funeral until you replace it with something more cheerful, which you might not feel like doing straight away. I guess I have to have it the way iOS wants me to have it.

1 Like

Thanks for this - it’s really interesting. So it’s the responsibility of the app not to keep the GPS running, for example. If you don’t trust the app, then you might be tempted to force-quit.

But the whole model this post reveals deserves much more serious study, which I hope to have time to do. It’s a new world.

7 posts were split to a new topic: Early systems that sidestepped the concept of quitting apps

On iOS, I force quit non-Apple apps that have a high probability of persistent tracking and data collection when I am not actively using them (yes, I know about the various toggles in Settings but I believe many companies have developed work-arounds), such as my mobile provider’s rewards app, social media apps, and mapping apps.

Where does a reboot (slide to power off and then start) fit into this discussion?

I ask because something can cause my iPhone 13 to drain the battery fast. I look at Setting>Battery and I don’t see any differences. I thought it was because I had touch to show the screen enabled (it definitely would light up the screen in my pocket sometimes), so several weeks ago changed so side button was required to light up the screen but still occasionally drains fast (I become aware of this because the phone is hot). Not related to cellular strength (I do go out of reach sometimes and know that that can definitely cause fast drain, so try to remember to go into airplane mode). I find that a reboot results in the phone cooling off.

Do you mean under “Battery Usage by App” (at the bottom of the page you referenced) you don’t see any apps with particularly high battery usage?

Well, a power-off definitely causes all processes to quit. :slight_smile:

When you restart, iOS won’t try to restart everything, even though the list of recent apps (that you swipe-up from the force-quit) will remain populated.

It will restart some apps, but I’m not sure exactly what the rule is. I suspect it will be those that are configured to allow “background app refresh” (Settings → General → Background App Refresh). And even then, I expect it will only launch those parts of the app needed to perform background app refreshing, not the rest of the app.

There are two things that I’ve found can make a phone hot.

One is using it in bright sunlight. Apple’s displays can get very bright, to allow visibility in direct sunlight, but when they’re this bright, they get hot and drain your battery. If used for too long in this state, they can actually trigger an overheating situation, which will cause the display to switch to minimal brightness and slow the CPU a lot.

The other is an app that’s drawing a lot of CPU/GPU power. Games are notorious for this. I’ve found that some ad networks that embed in other apps and web pages can also cause these kinds of problems.

If you’ve got an abusive/spyware app (I’m looking at you, Facebook and Google) that tries to monitor everything you do and phone home with it, that could easily do it as well.

I suspect this is your problem, because restarting the phone temporarily fixes it.

If you can’t identify the problem app, I would suggest that you go to the Background App Refresh page and disable the feature for everything you don’t actually want to operate in the background.

Some apps I leave enabled for backgorund refreshing include:

  • My bank apps. I always want them to notify me if something suspicious happens, and I want their content to remain up to date.
  • Books. So I don’t have to launch the app in order to get new books that I load from my Mac.
  • Notes. Again, so the notes will remain in sync at all times. Especially important because I sometimes need to access them when I don’t have network connectivity.
  • Siri. Not sure I need it, but it seems appropriate.

Just about everything else has background app refresh disabled. There is no reason for my games, YouTube, shopping apps, etc. to sync their content when I’m not actually using them. They sync just fine when I launch them, thank you very much.

The other thing I would suggest is limit what can access your location in the background, since GPS and the database lookup associated with it can consume battery and network bandwidth. Go to Settings → Privacy & Security → Location Services and configure each app.

In general, I permit only my credit card apps the ability to access my location in the background (the “Always” setting). I do this because many cards these days will use the location of your phone (once it is logged in to your account) as a part of the validation process. If you travel, charges away from home will be less likely to get flagged as suspicious if the app’s reported location is the same place you’re using the card.

Most other apps have location services set to “When Using”, meaning they will only have access when the app is running in the foreground. And only those apps where I think the location may be useful (e.g. Maps, Weather, Camera, etc.). Stuff where my location should not be necessary (e.g. games) are set to “Never”.

1 Like

Good suggestion, but all of this hard to maintain.

I do run Gaia, a GPS app, most of the time. I want the track to geolocate photos taken with a conventional camera. I know it’s a heavy user and always shows up as such. But it’s consist whether phone is hot or not.

I don’t think bright sunlight is the variable. Happens a lot less since I turned off, touch to show screen, but still happens. Since happening less, it’s hard to pin down what is the cause.

Not really. You need to take some time to set up the permissions once. After that they generally don’t change (unless some system upgrade bug messes things up).

So you really only need to review the list occasionally in order to set your preferences for newly-installed apps. And in many cases (especially for location services), iOS will ask you what you want the first time the app tries to use the service.