What about background location updates in IOS 18? Any changes from ios 17?

Generated on 7/31/2024

1 search

In iOS 18, there have been several updates to background location updates compared to iOS 17. Here are the key changes:

  1. Implicit Service Sessions: iOS 18 introduces implicit service sessions for CoreLocation APIs. This means that when your app iterates live updates or monitor events, it implicitly holds a CL service session. This can simplify your code as you may not need to explicitly manage these sessions (What’s new in location authorization).

  2. Session Lifecycle: CoreLocation now ties session life directly to feature spans. This means that if your app is tracking a workout or another long-running task, the session will continue even if the app is suspended or terminated, as long as the task is still relevant (What’s new in location authorization).

  3. Authorization Requirements: Always authorization will only be effective when your app is in the foreground. This change means that you need to manage when and how you request location permissions more carefully (What’s new in location authorization).

  4. Diagnostic Properties: New diagnostic properties have been added to CL location updates and monitor events. These properties help explain why updates might not be arriving, such as due to accuracy limitations or the device being stationary (What’s new in location authorization).

These updates aim to provide more control and transparency over location services, making it easier to manage background location updates effectively.

Relevant Sessions