LocationAuthorizationMonitor
public class LocationAuthorizationMonitor : BaseMonitor
A LocationAuthorizationMonitor
instance monitors the app for updates to
its authorization to use location services.
-
Encapsulates updates to location services authorization.
See moreDeclaration
Swift
public enum Event
-
Encapsulates information associated with a location authorization monitor event.
See moreDeclaration
Swift
public enum Info
-
Initializes a new
LocationAuthorizationMonitor
.Declaration
Swift
public init(queue: OperationQueue, handler: @escaping (Event) -> Void)
Parameters
queue
The operation queue on which the handler executes.
handler
The handler to call when location services authorization is requested or updated.
-
A Boolean value indicating whether location services are enabled on the device.
Declaration
Swift
public var isEnabled: Bool { get }
-
A value indicating whether the app is authorized to use location services.
Declaration
Swift
public var status: CLAuthorizationStatus { get }
-
Requests permission to use location services whenever the app is running.
Declaration
Swift
public func requestAlways()
-
Requests permission to use location services while the app is in the foreground.
Declaration
Swift
public func requestWhenInUse()