Classes

The following classes are available globally.

  • Wrapper for meta-information related to an accident detected by the SDK.

    See more

    Declaration

    Swift

    @objc(ZDAccidentInfo)
    public class AccidentInfo : NSObject
  • Information about the active drive if any.

    See more

    Declaration

    Swift

    @objc(ZDActiveDriveInfo)
    public class ActiveDriveInfo : NSObject
  • This contains the fully analyzed results for a drive, this is returned from ZendriveDelegate.processAnalysis(ofDrive:) callback for all the trips with the value of DriveInfo.driveType not set to DriveType.invalid.

    The data of this type will always be of equal or better quality than EstimatedDriveInfo returned from ZendriveDelegate.processEnd(ofDrive:)

    Typically ZendriveDelegate.processAnalysis(ofDrive:) will be fired within a few seconds after ZendriveDelegate.processEnd(ofDrive:) callback but in some rare cases this delay can be really large depending on phone network conditions.

    The callback for this ZendriveDelegate.processAnalysis(ofDrive:) will be fired in trip occurrence sequence, i.e. from oldest trip to the latest trip.

    Declaration

    Swift

    @objc(ZDAnalyzedDriveInfo)
    public class AnalyzedDriveInfo : DriveInfo
  • Beacon

    Discussion: An iBeacon is a device that emits a Bluetooth signal that can be detected by your devices. The bluetooth advertisement can be defined by UUID, major and minor values. UUID must be specified. If only UUID is specified, the major and minor values will be wildcarded. Similarly if only UUID and major value are specified, the minor value will be wildcarded.

    See more

    Declaration

    Swift

    @objc(ZDBeacon)
    public class Beacon : NSObject
  • Wrapper to describe a bluetooth device.

    See more

    Declaration

    Swift

    @objc(ZDBluetoothDevice)
    public class BluetoothDevice : NSObject
  • This class contains parameters required by Zendrive during setup.

    See more

    Declaration

    Swift

    @objc(ZDConfiguration)
    public class Configuration : NSObject, NSCopying
  • Wrapper for meta-information related to a drive.

    See more

    Declaration

    Swift

    @objc(ZDDriveInfo)
    public class DriveInfo : NSObject
  • Information about a drive that was resumed in the Zendrive SDK.

    This is called after the drive recording resumes after a gap. The gap may occur due to an application restart by the OS, application kill and restart by a user, an application crash etc.

    See more

    Declaration

    Swift

    @objc(ZDDriveResumeInfo)
    public class DriveResumeInfo : NSObject
  • Driving Behaviour scores for a drive.

    The scores are expressed as a number between 0 to 100 and will be -1 if not available.

    High scores indicate safe driving and low scores reflect hazardous or risky driving patterns. Preventive or corrective actions should be prescribed in extreme cases.

    More information is available here

    See more

    Declaration

    Swift

    @objc(ZDDriveScore)
    public class DriveScore : NSObject
  • Information about start of a drive.

    See more

    Declaration

    Swift

    @objc(ZDDriveStartInfo)
    public class DriveStartInfo : NSObject
  • Keys for various properties returned by toJson method.

    Declaration

    Swift

    @objc(ZDDriverAttributesKeys)
    public class DriverAttributesKeys : NSObject
  • Additional attributes of a Zendrive driver.

    The application can specify both predefined and custom attributes for a driver. These attributes are associated with a SDK driverId at SDK initialization time. In addition to predefined special attributes, up to 4 custom key value attributes can be associated with a driver using the Zendrive SDK.

    Warning

    All attribute keys can be atmost 64 characters in length.

    Warning

    All attribute values can be atmost 1024 characters in length.
    See more

    Declaration

    Swift

    @objc(ZDDriverAttributes)
    public class DriverAttributes : NSObject, NSCopying
  • This contains the best estimated results for a drive, this is returned from ZendriveDelegate.processEnd(ofDrive estimatedDriveInfo:) callback.

    The data of this type will always be of same or little bad quality than AnalyzedDriveInfo returned from ZendriveDelegate.processAnalysis(ofDrive analyzedDriveInfo:)

    All drives with driveType not set to DriveType.invalid will get a corresponding ZendriveDelegate.processAnalysis(ofDrive analyzedDriveInfo:) callback.

    Typically ZendriveDelegate.processAnalysis(ofDrive analyzedDriveInfo:) will be fired within a few seconds after ZendriveDelegate.processEnd(ofDrive estimatedDriveInfo:) callback but in some rare cases this delay can be really large depending on phone network conditions.

    Declaration

    Swift

    @objc(ZDEstimatedDriveInfo)
    public class EstimatedDriveInfo : DriveInfo
  • A valid object of this class is returned in Event.speedingData whenever Event.eventType is equal to EventType.overSpeeding.

    See more

    Declaration

    Swift

    @objc(ZDSpeedingData)
    public class SpeedingData : NSObject
  • Represents a driving behavior event like phone use, aggressive acceleration etc. It is part of DriveInfo object of ZendriveDelegate.processEnd(ofDrive estimatedDriveInfo:) callback.

    See more

    Declaration

    Swift

    @objc(ZDEvent)
    public class Event : NSObject
  • Represents ratings associated with the various event types for a trip. Higher rating for an event represents safe driving behaviour with respect to that event. For cases where rating is absent, StarRating.NA is reported.

    See also

    StarRating
    See more

    Declaration

    Swift

    @objc(ZDEventRatings)
    public class EventRatings : NSObject
  • Represents a geographical coordinate.

    See more

    Declaration

    Swift

    @objc(ZDLocationPoint)
    public class LocationPoint : NSObject
  • This class contains parameters required by ZendriveTest.raiseMockAccidentUsingConfig(using:) for testing accident flow.

    See more

    Declaration

    Swift

    @objc(ZDMockAccidentConfig)
    public class MockAccidentConfig : NSObject, NSCopying
  • This class surfaces errors in device or application settings that affects trip detection in the SDK.

    See more

    Declaration

    Swift

    @objc(ZDSettings)
    public class Settings : NSObject
  • This class represent an error in device or application settings that is affecting the ability of the SDK to detect trips.

    See more

    Declaration

    Swift

    @objc(ZDSettingsError)
    public class SettingsError : NSObject
  • Represents the current state of the Zendrive SDK.

    See more

    Declaration

    Swift

    @objc(ZDState)
    public class State : NSObject
  • This class is used to represent any additional information related to a drive.

    See more

    Declaration

    Swift

    @objc(ZDTagInfo)
    public final class TagInfo : NSObject
  • Represents a single warning that might have occurred during your trip. A collection of these warnings are provided using the ZendriveDelegate.processAnalysis(ofDrive:) callback.

    See more

    Declaration

    Swift

    @objc(ZDTripWarning)
    public class TripWarning : NSObject
  • Wrapper for meta-information related to a vehicle.

    See more

    Declaration

    Swift

    @objc(ZDVehicleInfo)
    public final class VehicleInfo : NSObject
  • Zendrive Object.

    See more

    Declaration

    Swift

    @objc(ZDZendrive)
    public final class Zendrive : NSObject
  • Utility class which helps in uploading data required for debugging Zendrive SDK related issues.

    See more

    Declaration

    Swift

    @objc(ZDZendriveDebug)
    public final class ZendriveDebug : NSObject
  • Class for providing feedback back to Zendrive

    See more

    Declaration

    Swift

    @objc(ZDZendriveFeedback)
    public final class ZendriveFeedback : NSObject
  • Applications which want to record Fairmatic insurance periods for a driver may use these APIs.

    All drives (automatically detected or manually started) when a period is in progress will be tagged with the period id. This period id will be made available in the reports and API that Fairmatic provides via Zendrive.

    Only one period can be active at a time. Switching periods or calling ZendriveInsurance.stopPeriod(_:) stops any active drives (automatic or manual). A drive with multiple insurance periods will be split into multiple trips for different insurance periods.

    See more

    Declaration

    Swift

    @objc(ZDZendriveInsurance)
    public final class ZendriveInsurance : NSObject
  • This class contains methods that mock Zendrive’s functionality for testing purposes.

    See more

    Declaration

    Swift

    @objc(ZDZendriveTest)
    public final class ZendriveTest : NSObject
  • This class manages association and dissociation of vehicles to Zendrive SDK.

    See more

    Declaration

    Swift

    @objc(ZDZendriveVehicleTagging)
    public class ZendriveVehicleTagging : NSObject