Instance Property

activityType

The type of user activity associated with the location updates.

Declaration

var activityType: CLActivityType { get set }

Discussion

The location manager uses the information in this property as a cue to determine when location updates may be automatically paused. Pausing updates gives the system the opportunity to save power in situations where the user's location is not likely to be changing. For example, if the activity type is automotiveNavigation and no location changes have occurred recently, the radios might be powered down until movement is detected again.

After a pause occurs, it is your responsibility to restart location services again when you determine that they are needed. For more information on ways to restart location services after a pause, see the discussion of the pausesLocationUpdatesAutomatically property.

The default value of this property is other.

See Also

Initiating Standard Location Updates

func startUpdatingLocation()

Starts the generation of updates that report the user’s current location.

func stopUpdatingLocation()

Stops the generation of location updates.

func requestLocation()

Requests the one-time delivery of the user’s current location.

var pausesLocationUpdatesAutomatically: Bool

A Boolean value indicating whether the location manager object may pause location updates.

var allowsBackgroundLocationUpdates: Bool

A Boolean value indicating whether the app should receive location updates when suspended.

var distanceFilter: CLLocationDistance

The minimum distance (measured in meters) a device must move horizontally before an update event is generated.

var desiredAccuracy: CLLocationAccuracy

The accuracy of the location data.

enum CLActivityType

Constants indicating the type of activity associated with location updates.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software