A query to access the location data stored in a workout route.


class HKWorkoutRouteQuery : HKQuery


Use a workout route query to access the location data associated with an HKWorkoutRoute. Because a route sample can include a large number of CLLocation objects, the query asynchronously returns the locations in batches. For detailed instructions, see Reading Route Data.


Creating Route Queries

init(route: HKWorkoutRoute, dataHandler: (HKWorkoutRouteQuery, [CLLocation]?, Bool, Error?) -> Void)

Creates and returns a new query to access the location data associated with a workout route.


Inherits From

Conforms To

See Also

Route Data

Creating a Workout Route

Record the user’s route during a workout.

Reading Route Data

Access the user’s route for a workout.

class HKWorkoutRouteBuilder

A builder object that incrementally constructs a workout route.

class HKWorkoutRoute

A sample that contains a workout’s route data.

let HKWorkoutRouteTypeIdentifier: String

A series sample containing location data that defines the route the user took during a workout.

class HKSeriesBuilder

An abstract base class for building series samples.

class HKSeriesSample

An abstract base class that defines samples that contain a series of items.