Contents

init(authorization:)

Creates a services session by using the authorization mode you specify.

Declaration

init(authorization: CLServiceSession.AuthorizationRequirement)

Discussion

Passing .none for authorization requirement creates a session object that doesn’t request a person’s authorization to access Location Services, but the object meets a requested Explicit Service Session requirement if the framework already has authorization.

Passing an authorization requirement other than .none causes Location Services to request a person’s permission for the corresponding level of authorization when possible — for example, when your app is in the foreground, when a person hasn’t denied an earlier authorization request, or if parental control settings don’t restrict changes to the ability to request a person’s location.

See Also

Creating a session