What's new in CoreLocation?

Generated on 8/7/2024

1 search

In the WWDC 2024 session titled "What’s new in location authorization," several updates and new features for CoreLocation were introduced:

  1. CL Service Session:

    • A new declarative way to manage location authorization goals for different features of your app.
    • Allows you to specify what kind of location data you need and when you need it, making the code more robust and easier to manage.
  2. Implicit Service Sessions:

    • CoreLocation can now treat the act of iterating live updates or monitor events as implicitly holding a CL service session.
    • This means you may be able to update your app to handle CoreLocation authorization with service sessions just by deleting code.
  3. Diagnostic Properties:

    • New diagnostic properties provide a complete contextual understanding of the current authorization state and the function of any CoreLocation API objects.
    • These properties help you understand why updates or events might not be yielded, such as due to accuracy limitations or other conditions.
  4. Session Lifecycle:

    • CL service sessions are aligned with user-facing features and interact with the app's lifecycle.
    • Features can be short-lived or long-lived, and sessions can be layered or nested as needed.
  5. Authorization Goals:

    • Moving from a procedural model to a declarative one for interacting with location authorization.
    • Simplifies the process of requesting and managing location permissions.

For more detailed information, you can watch the session What’s new in location authorization starting from the "Authorization goals" chapter.