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;
  • 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;
  • 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;