Classes
The following classes are available globally.
-
Wrapper for meta-information related to an accident detected by the SDK.
See moreDeclaration
Swift
@objc(ZDAccidentInfo) public class AccidentInfo : NSObject
-
Information about the active drive if any.
See moreDeclaration
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 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(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 wild carded.
See moreDeclaration
Swift
@objc(ZDBeacon) public class Beacon : NSObject
-
Wrapper to describe a bluetooth device.
See moreDeclaration
Swift
@objc(ZDBluetoothDevice) public class BluetoothDevice : NSObject
-
Wrapper for meta-information related to a drive.
See moreDeclaration
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 moreDeclaration
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 moreDeclaration
Swift
@objc(ZDDriveScore) public class DriveScore : NSObject
-
Information about start of a drive.
See moreDeclaration
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.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 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(ZDEstimatedDriveInfo) 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
-
Wrapper for extrapolated details for a drive.
See moreDeclaration
Swift
@objc(ZDExtrapolationDetails) public class ExtrapolationDetails : NSObject
-
Represents a geographical coordinate.
See moreDeclaration
Swift
@objc(ZDLocationPoint) public class LocationPoint : NSObject
-
This class contains parameters required by
See moreZendriveTest.raiseMockAccidentUsingConfig(using:)
for testing accident flow.Declaration
Swift
@objc(ZDMockAccidentConfig) public class MockAccidentConfig : NSObject, NSCopying
-
Wrapper for beacons scanned using
See moreZendriveVehicleTagging.getNearbyBeacons(uuid:major:minor:completionHandler:)
.Declaration
Swift
@objc(ZDScannedBeaconInfo) public class ScannedBeaconInfo : NSObject
-
This class surfaces errors in device or application settings that affects trip detection in the SDK.
See moreDeclaration
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 moreDeclaration
Swift
@objc(ZDSettingsError) public class SettingsError : NSObject
-
Represents the current state of the Zendrive SDK.
See moreDeclaration
Swift
@objc(ZDState) public class State : NSObject
-
This class is used to represent any additional information related to a drive.
See moreDeclaration
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
See moreZendriveDelegate.processAnalysis(ofDrive:)
callback.Declaration
Swift
@objc(ZDTripWarning) public class TripWarning : NSObject
-
This class represents a unique combination of beacon and vehicleId. It is used to identify the beacons that are used to tag the trip with vehicle.
See moreDeclaration
Swift
@objc(ZDVehicleBeacon) public class VehicleBeacon : NSObject
-
Wrapper for meta-information related to a vehicle.
See moreDeclaration
Swift
@objc(ZDVehicleInfo) public final class VehicleInfo : 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
-
This class manages association and dissociation of vehicles to Zendrive SDK.
See moreDeclaration
Swift
@objc(ZDZendriveVehicleTagging) public class ZendriveVehicleTagging : NSObject