Get started
Last updated
Was this helpful?
Last updated
Was this helpful?
Before starting DriveKit Driver Data UI integration, make sure that you have and components, especially if you have .
The Driver Data UI SDK is available on Cocoapods master repo.
To access the framework in the repository, add the following lines to your Podfile:
Then, run pod install
.
If you have , the Driver Data UI module must also be manually initialized. In the application's AppDelegate file, import DriveKitDriverDataUI
:
Then, to initialize Driver Data UI SDK in your app, you must call the initialization method in didFinishLaunchingWithOptions
method of your AppDelegate:
It is possible to choose the main theme for the trip list. The main theme of the trip list is used to select the score to be displayed on the left side of the trip list. It is set by the TripData
enum. It has 6 possible values:
.safety
: The driving safety score.
.ecoDriving
: The eco-driving score.
.distraction
: The driving distraction score.
.distance
: The trip distance.
.duration
: The driving duration.
.speeding
: The speeding score.
The value .speeding
can be set only if this configuration is enabled for your API key.
The main theme is configured in the SDK initialize
method by setting the parameter tripData
.
The default value is safety
.
A trip is analyzed through several dimensions and DriveQuant's services provide multiple categories of scores. Depending on your need, you can highlight the scores of interest and hide some of them. The configuration of the trip detail screen allows to choose the displayed themes and the displaying order. To switch from one theme to another, simply swipe the bottom part of the screen or click on one of the pictograms in the navigation bar at the top of the screen.
The screens that can be displayed are listed below:
The safety analysis results: .safety
.
The eco-driving results: .ecoDriving
.
The distracted driving results: .distraction
.
The speeding driving results: .speeding
.
A scrollable list that displays all the events that occurred during the trip: .interactiveMap
.
Synthetic data of the trip as average speed, CO2 emissions, estimated fuel consumption, driving conditions : .synthesis
.
The value .speeding
can be set only if this configuration is activated on your team.
The main theme is configured in the SDK initialize
method by setting the parameter mapItems
.
The default value is:
[.safety, .ecoDriving, .distraction, .speeding, .interactiveMap, .synthesis]
To show view in your navigation controller, you just have to create an instance of TripListVC
and then push the view controller in your navigation controller.
To override colors and texts in Driver Data UI SDK, see .