The following classes are available globally.

  • The central class for interacting with LocoKit location and motion recording. All actions should be performed on the LocomotionManager.highlander singleton.


    LocomotionManager monitors raw device location and motion data and applies filtering and smoothing algorithms to produce a stream of high level LocomotionSample objects, a composite representation of the device and user’s location and activity state at each point in time.

    Locomotion samples include filtered and smoothed locations, the user’s moving or stationary state, current activity type (eg walking, running, cycling, etc), step hertz (ie walking, running, or cycling cadence), and more.

    Energy Efficiency

    LocomotionManager dynamically adjusts various device monitoring parameters, balancing current conditions and desired results to achieve the desired accuracy in the most energy efficient manner.

    Starting and Stopping Recording

    To start recording location and motion data call startRecording(), and call stopRecording() to stop.

    Update Notifications

    LocomotionManager will send locomotionSampleUpdated notifications via the system default NotificationCenter when each new location arrives.

    Raw, Filtered, and Smoothed Data

    LocoKit provides three levels of location data: Raw CLLocations, filtered CLLocations, and high level location and activity state LocomotionSamples. See the documentation for rawLocation, filteredLocation, and LocomotionSample for details on each.

    Moving State

    When each raw location arrives LocomotionManager updates its determination of whether the user is moving or stationary, based on changes between current and previous locations over time. The most up to date determination is available either from the movingState property on the LocomotionManager, or on the latest locomotionSample. See the movingState documentation for further details.

    See more



    @objc public class LocomotionManager: NSObject
  • A composite, high level representation of the device’s location, motion, and activity states over a brief duration of time.

    The current sample can be retrieved from LocomotionManager.highlander.locomotionSample().

    Dynamic Sample Sizes

    Each sample’s duration is dynamically determined, depending on the quality and quantity of available ocation and motion data. Samples sizes typically range from 10 to 60 seconds, however varying conditions can sometimes produce sample durations outside those bounds.

    Higher quality and quantity of available data results in shorter sample durations, with more specific representations of single moments in time.

    Lesser quality or quantity of available data result in longer sample durations, thus representing the average or most common states and location over the sample period instead of a single specific moment.

    See more



    open class LocomotionSample: ActivityTypeTrainable, TimelineObject, Codable
  • Undocumented

    See more



    public class Merge: CustomStringConvertible