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 (nonatomic, strong, 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 (nonatomic, strong, 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 (nonatomic, strong, 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 (nonatomic) ZendriveDriveDetectionMode driveDetectionMode;
-
This field specifies the region where user’s data will reside.
This field is OPTIONAL. Default value is
ZendriveRegion.ZendriveRegionUS
.Application will not be allowed to change the region post Zendrive SDK setup. To change region application should call
-[Zendrive wipeOut:]
api first.Declaration
Objective-C
@property (nonatomic) ZendriveRegion region;
-
Deprecated
This property needs to be set to NO and the application should completely control the user experience related to asking location permission.
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 toNO.
The default value of this property is
YES.
Declaration
Objective-C
@property (nonatomic) BOOL managesLocationPermission;
-
Deprecated
This property needs to be set to NO and the application should completely control the user experience related to asking motion and fitness permission.
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 (nonatomic) BOOL managesActivityPermission;
-
Developers have to set this property to
YES
if the app implements multiple accident callbacks - potential callback and the final callbackIf set to
NO,
the SDK assumes that potential accident callback is not implemented.The default value of this property is
NO.
Declaration
Objective-C
@property (nonatomic) BOOL implementsMultipleAccidentCallbacks;