Information about the user's location during a specific period of time.


class CLVisit : NSObject


A CLVisit object encapsulates information about places that the user has been. Visit objects are created by the system and delivered by the CLLocationManager object to its delegate after you start the delivery of events. The visit includes the location where the visit occurred and information about the arrival and departure times as relevant. You do not create visit objects directly, nor should you subclass CLVisit.

Visit objects contain as much information about the visit as possible but may not always include both the arrival and departure times. For example, when the user arrives at a location, the system may send an event with only an arrival time. When the user departs a location, the event can contain both the arrival time (if your app was monitoring visits prior to the user’s arrival) and the departure time.


Getting the Location of the Visit

var coordinate: CLLocationCoordinate2D

The geographical coordinate information.

var horizontalAccuracy: CLLocationAccuracy

The horizontal accuracy (in meters) of the specified coordinate.

Getting the Duration of the Visit

var arrivalDate: Date

The approximate time at which the user arrived at the specified location.

var departureDate: Date

The approximate time at which the user left the specified location.


Inherits From

See Also

Location Updates

Getting the User's Location

Receive location data in your app.

class CLLocation

The latitude, longitude, and course information reported by the system.

struct CLLocationCoordinate2D

The latitude and longitude associated with a location, specified using the WGS 84 reference frame.

class CLFloor

The floor of a building on which the user's device is located.