RegionMonitor

public class RegionMonitor : BaseMonitor

A RegionMonitor instance monitors a region for changes to its state (which indicate boundary transitions). A region can be either a geographical region or a Bluetooth low-energy beacon region.

Note

An authorization status of authorizedAlways is required.
  • Encapsulates changes to the state of the region.

    See more

    Declaration

    Swift

    public enum Event
  • Encapsulates information associated with a region monitor event.

    See more

    Declaration

    Swift

    public enum Info
  • Initializes a new RegionMonitor.

    Declaration

    Swift

    public init(region: CLRegion,
                queue: OperationQueue,
                handler: @escaping (Event) -> Void)

    Parameters

    region

    The region to monitor.

    queue

    The operation queue on which the handler executes.

    handler

    The handler to call when the state of the region changes.

  • The region being monitored.

    Declaration

    Swift

    public let region: CLRegion
  • A Boolean value indicating whether the region is actively being monitored. There is a system-imposed, per-app limit to how many regions can be actively monitored.

    Declaration

    Swift

    public var isActivelyMonitored: Bool { get }
  • A Boolean value indicating whether the device supports monitoring the region.

    Declaration

    Swift

    public var isAvailable: Bool { get }
  • The largest boundary distance that can be assigned to a region.

    Declaration

    Swift

    public var maximumMonitoringDistance: CLLocationDistance { get }
  • Requests the current state of the region.

    Declaration

    Swift

    public func requestState()
  • Declaration

    Swift

    override public func cleanupMonitor()
  • Declaration

    Swift

    override public func configureMonitor()