ZendriveConfiguration

@interface ZendriveConfiguration : NSObject <NSCopying>

This class contains parameters required by Zendrive during setup.

  • Your application key.

    Pass in the application key for your app. If you don’t have one, please create one at https://developers.zendrive.com/signup

    This field is REQUIRED and should be a valid string. Check +[Zendrive isValidInputParameter:] to validate this field. Nil strings are not allowed. Passing invalid string would cause SDK setup to fail.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nonnull) NSString *applicationKey;
  • Unique ID for the current user. This can be any ID used by your app to identify its users. This is the ID which will be used in Zendrive reports. Use +[Zendrive isValidInputParameter:] to verify that userId is valid.

    This field is REQUIRED and should be a valid string. Check +[Zendrive isValidInputParameter:] to validate this field. Nil strings are not allowed. Passing invalid string would cause SDK setup to fail.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nonnull) NSString *driverId;
  • Attributes for the current user. These attributes are stored on the server and are provided in Zendrive’s APIs. Any existing attributes would be overwritten on the server when a non-nil value for this param is passed. Passing nil is a no-op.

    Use this param to provide meta-information about the user like name, email, groupId or any custom attributes you wish to provide. Default value is nil.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        ZendriveDriverAttributes *driverAttributes;
  • Deprecated

    Property ignored. It is always set to ZendriveOperationModeDriverAnalytics

    You should assign a value to this property that is appropriate for your usage scenario. For example, if you need only drive start/end detection with coarse distance and waypoints, use ZendriveOperationModeDriveTracking.

    Refer to ZendriveOperationMode documentation for choosing a mode which suits your application requirements. Once setup, all drives detected by the SDK would be in the specified operationMode. If you wish to change the operation mode at any point, you need to call +[Zendrive teardownWithCompletionHandler:] and setup the SDK again.

    Warning

    Property ignored. It is always set to ZendriveOperationModeDriverAnalytics.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) ZendriveOperationMode operationMode;
  • Use this mode to control the SDK’s behaviour for detecting drives automatically. This mode can be changed at a later point using +[Zendrive setDriveDetectionMode:completionHandler:] method.

    Applications which do not want the SDK to continuously track drives in background should set this value to ZendriveDriveDetectionModeAutoOFF. With this, the application needs to call +[Zendrive startManualDrive:completionHandler] method to record drives. In case the application wants to enable auto drive detection only for a fixed duration (like when the driver is on-duty), use method +[Zendrive setDriveDetectionMode:completionHandler:] to change the mode to ZendriveDriveDetectionModeAutoON for that period and set it back to ZendriveDriveDetectionModeAutoOFF (once the driver goes off-duty).

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        ZendriveDriveDetectionMode driveDetectionMode;
  • Deprecated

    Property ignored. It is always set to ZendriveAccidentDetectionModeEnabled

    Specify ZendriveAccidentDetectionModeEnabled to enable detection of accidents by the Zendrive SDK and receive realtime callbacks for the same. This feature is available only to premium account holders. Please refer to https://developers.zedrive.com for further details.

    Please refer to +[Zendrive isAccidentDetectionSupportedByDevice] to check whether accident detection would work on the device or not.

    Warning

    Property ignored. It is always set to ZendriveAccidentDetectionModeEnabled.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        ZendriveAccidentDetectionMode accidentDetectionMode;
  • Developers can set this property value to NO to have complete control on the location permission User Experience.

    If set to YES, ZendriveSDK would trigger location permission dialog on setup if permission is not available. -[ZendriveDelegateProtocol processLocationApproved] and -[ZendriveDelegateProtocol processLocationDenied] callbacks are not sent to Zendrive delegate if this property is set to NO.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL managesLocationPermission;
  • Developers can set this property value to NO to have complete control on the fitness and activity permission User Experience.

    If set to YES, ZendriveSDK would trigger fitness and activity permission dialog on setup if permission is not available.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL managesActivityPermission;