Contents

requestState(for:)

Retrieves the state of a region asynchronously.

Declaration

func requestState(for region: CLRegion)

Parameters

  • region:

    The region with the state you want to know. This object needs to be an instance of one of the standard region subclasses that Corelocation provides, such as Clcircularregion or Clbeaconregion. You can’t use this method to determine the state of custom regions you define yourself.

Discussion

This method performs the request asynchronously and delivers the results to the location manager’s delegate. You must implement the locationManager(_:didDetermineState:for:) method in the delegate to receive the results.

If the region parameter contains an unknown type of region object, this method does nothing. If a compatible iPad or iPhone app calls this method when running in visionOS, the method does nothing.

See Also

Methods