Classes

The following classes are available globally.

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

    See more

    Declaration

    Swift

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

    See more

    Declaration

    Swift

    @objc
    public class ActiveDriveInfo : 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
    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
    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
    public class DriveStartInfo : NSObject
  • Keys for various properties returned by toJson method.

    Declaration

    Swift

    @objc
    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
    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
    public class EstimatedDriveInfo : DriveInfo
  • 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
  • Represents the current state of the Zendrive SDK.

    See more

    Declaration

    Swift

    @objc(ZDState)
    public class State : 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