Background location indicator in Dynamic Island remains stuck after installing a new build over an app with an active location session

We are seeing a reproducible issue on a physical iPhone with Dynamic Island.

Steps to reproduce

  1. Install and launch version 1 of the app locally.
  2. Start background location tracking using CLLocationUpdate.liveUpdates() together with CLBackgroundActivitySession.
  3. Move the app to the background. The blue location indicator appears in the Dynamic Island.
  4. While tracking is still active, install version 2 over the existing app.
  5. Open the updated app.
  6. Stop all location tracking:
    • Cancel the CLLocationUpdate task.
    • Call invalidate() on the CLBackgroundActivitySession.
    • Release all references to the session.
  7. Move the app to the background again.

Expected behavior

The blue background location indicator disappears after the location updates and background activity session have been stopped.

Actual behavior

The blue location indicator remains permanently visible in the Dynamic Island, even though:

  • No location updates are being received.
  • No CLBackgroundActivitySession is retained.
  • Starting and stopping another location session does not remove it.
  • Force-quitting and reopening the app does not remove it.

Only restarting the iPhone makes the indicator disappear.

The problem occurs when a new build is installed over an existing installation while a background location session is active. Starting and stopping the same session normally within one installed version works as expected.

Comparison with Live Activity background location

The app also has a separate location feature that uses an active Live Activity to support background location updates without creating a CLBackgroundActivitySession.

Installing a new build while that feature is active does not cause the blue location indicator to become stuck. The problem has only been reproduced when a CLBackgroundActivitySession is active during the installation.

This suggests that the issue is specifically related to transferring or cleaning up CLBackgroundActivitySession state across an app update, rather than to CLLocationUpdate.liveUpdates() itself.

Questions

  • Is this a known issue with CLBackgroundActivitySession or CLLocationUpdate.liveUpdates()?
  • Is there a supported way for the newly installed app process to invalidate or clean up a background location session created by the previous app process?

Thanks so much for the very interesting post. However I’m not following the workflow to be honest.

When you use CLBackgroundActivitySession, you are taking out a system-level assertion that keeps your app alive and tells the system to display the blue location indicator. Under normal circumstances, if your app crashes or is force-quit, the OS detects the process death and automatically cleans up the assertion, removing the indicator.

As you noted, Live Activities use a completely different attribution and lifecycle mechanism, which is why they survive or clean up correctly during an update.

CLBackgroundActivitySession lifecycle is strictly tied to the object instance in memory or deallocation. Once the original process is killed during the update, that object is gone forever.

I am more interested in understanding your objectives. If you could provide a detailed description of the goal you intend to achieve through the Live Activity, I am confident that many developers will be able to assist you in achieving that goal.

Also I want to make sure this is not a bug where the OS loses track of the assertion. We can go ahead and file a bug if you have a focused sample project that will reproduce to the engineering team?

Albert  WWDR

Thanks, Albert. To clarify, this issue isn’t related to our Live Activity. The affected gps track-recording feature currently doesn’t use a Live Activity.

Our use case is continuous background track recording using CLLocationUpdate.liveUpdates() together with a retained CLBackgroundActivitySession. The blue location indicator during recording is expected.

The issue occurs when the app is updated while background tracking is active:

  1. Version 1 is recording in the background.
  2. While CLLocationUpdate.liveUpdates() and the retained CLBackgroundActivitySession are still active, version 2 is installed over the existing app.
  3. The old process is terminated during installation.
  4. Version 2 stops or doesn’t resume location tracking.

The blue indicator nevertheless remains permanently visible. Force-quitting and reopening the app doesn’t remove it. Only restarting the iPhone clears it.

The issue occurs during App Store updates, but it can also be reproduced during development by installing a newer build over the existing app using Xcode.

This suggests that the system-level assertion belonging to the process terminated during installation isn’t being cleaned up correctly.

If helpful, we can prepare a focused sample app that reproduces the issue.

Thank you for the post and the clarification regarding the issue. Indeed, focused sample projects are the most effective language in the forums.

To my knowledge, and this is limited, location should detect process termination and invalidate the CLBackgroundActivitySession. This should subsequently instruct SpringBoard to remove the blue indicator. However, the fact that the indicator persists across force quits and only clears upon device restart is unusual.

A focused sample project, along with a sysdiagnose on the device experiencing this issue, is always the recommended practice to expedite the review process.

Albert  WWDR

Thanks, Albert. One clarification: the issue does not occur during a normal user-initiated force quit.

If the user force-quits the app while the CLBackgroundActivitySession is active, the blue location indicator is removed as expected.

The issue occurs specifically during an in-place app update:

  1. The installed version starts a CLBackgroundActivitySession.
  2. While that session is active, a newer version is installed over the existing app.
  3. After the process replacement, the blue location indicator remains visible.
  4. Force-quitting the newly installed version does not remove it.
  5. Only restarting the device clears the indicator.

It therefore appears that the assertion belonging to the previous app process becomes orphaned during the update. The newly installed process has no reference to that session and cannot invalidate it.

We have submitted a focused sample project and a sysdiagnose through Feedback Assistant:

FB24182791 — Blue location indicator remains after in-place app update with active CLBackgroundActivitySession

Thanks again for pointing us in the right direction.

Background location indicator in Dynamic Island remains stuck after installing a new build over an app with an active location session
 
 
Q