Classes
The following classes are available globally.
-
Wrapper for meta-information related to an accident detected by the SDK.
See moreDeclaration
Swift
@objc public class AccidentInfo : NSObject
-
Information about the active drive if any.
See moreDeclaration
Swift
@objc 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 ofDriveInfo.driveType
not set toDriveType.invalid
.The data of this type will always be of equal or better quality than
EstimatedDriveInfo
returned fromZendriveDelegate.processEnd(ofDrive:)
Typically
ZendriveDelegate.processAnalysis(ofDrive:)
will be fired within a few seconds afterZendriveDelegate.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 public class AnalyzedDriveInfo : DriveInfo
-
Wrapper for meta-information related to a drive.
See moreDeclaration
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 moreDeclaration
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 moreDeclaration
Swift
@objc(ZDDriveScore) public class DriveScore : NSObject
-
Information about start of a drive.
See moreDeclaration
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.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 fromZendriveDelegate.processAnalysis(ofDrive analyzedDriveInfo:)
All drives with driveType not set to
DriveType.invalid
will get a correspondingZendriveDelegate.processAnalysis(ofDrive analyzedDriveInfo:)
callback.Typically
ZendriveDelegate.processAnalysis(ofDrive analyzedDriveInfo:)
will be fired within a few seconds afterZendriveDelegate.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
-
A valid object of this class is returned in
See moreEvent.speedingData
wheneverEvent.eventType
is equal toEventType.overSpeeding
.Declaration
Swift
@objc(ZDSpeedingData) public class SpeedingData : 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
Declaration
Swift
@objc(ZDEventRatings) public class EventRatings : NSObject
-
Represents a geographical coordinate.
See moreDeclaration
Swift
@objc(ZDLocationPoint) public class LocationPoint : NSObject
-
Represents the current state of the Zendrive SDK.
See moreDeclaration
Swift
@objc(ZDState) public class State : NSObject
-
Represents a single warning that might have occurred during your trip. A collection of these warnings are provided using the
See moreZendriveDelegate.processAnalysis(ofDrive:)
callback.Declaration
Swift
@objc(ZDTripWarning) public class TripWarning : NSObject
-
Zendrive Object.
See moreDeclaration
Swift
@objc(ZDZendrive) public final class Zendrive : NSObject
-
Utility class which helps in uploading data required for debugging Zendrive SDK related issues.
See moreDeclaration
Swift
@objc(ZDZendriveDebug) public final class ZendriveDebug : 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
See moreZendriveInsurance.stopPeriod(_:)
stops any active drives (automatic or manual). A drive with multiple insurance periods will be split into multiple trips for different insurance periods.Declaration
Swift
@objc(ZDZendriveInsurance) public final class ZendriveInsurance : NSObject
-
This class contains methods that mock Zendrive’s functionality for testing purposes.
See moreDeclaration
Swift
@objc(ZDZendriveTest) public final class ZendriveTest : NSObject