MobilityKit

public class MobilityKit

MobilityKit

  • The delegate of the MobilityKit receiving the events and updates

    Declaration

    Swift

    public static var delegate: MobilityKitDelegate? { get set }
  • Start mobility tracking

    Declaration

    Swift

    public static func start()
  • Stop mobility tracking

    Declaration

    Swift

    public static func stop()
  • Get the current model with visited places and mobility timeline

    Declaration

    Swift

    public static func model() -> MBModel
  • Get list of detected devices

    Declaration

    Swift

    public static func devices() -> [MBDevice]

    Return Value

    An array of all detected devices

  • Configure a detected device as a car

    Declaration

    Swift

    public static func update(deviceUID: String, registeredAsCar: Bool)

    Parameters

    deviceUID

    The unique ID of the device

    registeredAsCar

    If true, set this device as a car

  • Request permission to CoreMotion activity recognition

    Declaration

    Swift

    public static func requestMotionPermission(_ result: @escaping PermissionCallback)
  • Request permission to CoreLocation location updates (always)

    Declaration

    Swift

    public static func requestLocationPermission(_ result: @escaping PermissionCallback)
  • Check current state of permission to activity recognition

    Declaration

    Swift

    public static func checkMotionPermission() -> PermissionStatus

    Return Value

    Status of the permission

  • Check current state of permission to location updates (always)

    Declaration

    Swift

    public static func checkLocationPermission() -> PermissionStatus

    Return Value

    Status of the permission