How can I silently record location in the background, beyond permissions
Asked on 2026-05-30
1 search
To silently record location in the background, beyond permissions, you need to consider the new updates in location authorization as discussed in the session "What’s new in location authorization" from WWDC 2024. Here are some key points:
-
CL Service Sessions: You can use CL service sessions to assert your app's continued interest in its authorization goal. This helps in maintaining location tracking even when the app is in the background. CoreLocation won't ask users to adjust your app's authorization level while it's in the background, but it can restore authorization when the app comes back to the foreground if needed.
-
Session Lifecycle: It's important to tie the session life directly to the feature span. This means holding sessions into the background works even if the app is later suspended or terminated. CoreLocation will resume or relaunch the app into the background when new information is ready for delivery and the app's authorization allows it.
-
Explicit Service Sessions: Starting this year, always authorization will only be effective when you hold an explicit service session, and you can only start holding one when your app is in the foreground. This means you need to proactively manage these sessions to ensure continuous location tracking.
For more detailed information, you can refer to the session What’s new in location authorization (09:25) which discusses session lifecycle and how to manage location authorization effectively.

What’s new in location authorization
Location authorization is turning 2.0. Learn about new recommendations and techniques to get the authorization you need, and a new system of diagnostics that can let you know when an authorization goal can’t be met.

Build a spatial drawing app with RealityKit
Harness the power of RealityKit through the process of building a spatial drawing app. As you create an eye-catching spatial experience that integrates RealityKit with ARKit and SwiftUI, you’ll explore how resources work in RealityKit and how to use features like low-level mesh and texture APIs to achieve fast updates of the users’ brush strokes.

Keynote
Don’t miss the exciting reveal of the latest Apple software and technologies.
