Contents

init(authorization:fullAccuracyPurposeKey:)

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

Declaration

init(authorization: CLServiceSession.AuthorizationRequirement, fullAccuracyPurposeKey: String)

Discussion

Passing .none for authorization requirement and omitting any accuracy 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 has 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