Tell me detail about new location manager

Generated on 8/7/2024

1 search

The new location manager updates were discussed in the session titled What’s new in location authorization. Here are the key details:

  1. Introduction of CL Service Session:

    • The CL Service Session is a new declarative way to manage location authorization. It allows you to specify what kind of location data your app needs for each feature while it is running.
    • This approach simplifies the process of requesting location permissions and makes the code more robust.
  2. Authorization Goals:

    • The session explains how to move from a procedural model to a declarative one for interacting with location authorization.
    • It covers the different states of location authorization, such as "not determined," "when in use," and "denied," and how users can choose to give full precision or approximate access.
  3. Session Lifecycle:

    • The lifecycle of a CL Service Session is discussed, including when to create one and what happens when the app is suspended or terminated.
    • The session emphasizes the importance of layering service sessions for different app components to ensure each feature is self-sufficient.
  4. Diagnostic Properties:

    • A new system of diagnostic properties is introduced, which provides a complete contextual understanding of the current authorization state and the function of any other CoreLocation API objects.
    • These properties help in understanding why certain updates or events might not be yielding the intended results.
  5. Implicit Service Sessions:

    • Modern CoreLocation APIs that provide async sequences will implicitly represent the goal authorization state of "when in use" while iterating.
    • This means that in many cases, you can handle location authorization by simply iterating over live updates or monitor events, reducing the need for explicit authorization requests.

For more detailed information, you can watch the session What’s new in location authorization.