LogoLogo
ProductsUse casesDocsSupport
  • Introducing DriveKit
  • DriveKit Guides
  • Get started with drivekit
    • Trip recording lifecycle
    • iOS
      • 🚀Quick start
      • Advanced configurations
      • References
      • iOS DriveKit Demo App
    • Android
      • 🚀Quick start
      • Advanced configurations
      • References
      • Android DriveKit Demo App
      • Android 15 Migration guide
      • Android 14 Migration guide
      • Troubleshooting
  • Trip analysis
    • Introduction
    • iOS
      • Permissions
      • Trip management
      • TripListener
      • Crash Detection
      • Beacon usage
      • Bluetooth usage
      • Custom metadata
      • References (iOS)
    • Android
      • Runtime permissions
      • Trip management
      • TripListener
      • Crash Detection
      • Beacon usage
      • Bluetooth usage
      • Custom metadata
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Working hours
        • Driver alert in case of crash
        • Trip recording widget
        • Location sharing
      • Android
        • Get started
        • Working hours
        • Driver alert in case of crash
        • Trip recording widget
        • Location sharing
    • REST services
      • Trip
      • References
    • Trip Simulator
      • iOS
      • Android
  • PERMISSIONS UTILS
    • Introduction
    • User interface
      • iOS
        • Get started
        • Main configurations
      • Android
        • Get started
        • Main configurations
  • COMMON UI
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
    • References
  • DRIVER DATA
    • Introduction
    • iOS
      • Get started
      • References (iOS)
    • Android
      • Get started
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Advanced configurations
        • Trips widgets
        • My Synthesis
        • My Driver Profile
      • Android
        • Get Started
        • Advanced configurations
        • Trips widgets
        • My Synthesis
        • My Driver Profile
  • Driver Data Timeline UI
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
  • Vehicle
    • Introduction
    • iOS
      • Get started
      • Vehicle management
      • Beacon management
      • Bluetooth device management
      • Odometer
      • References (iOS)
    • Android
      • Get started
      • Vehicle management
      • Beacon management
      • Bluetooth device management
      • Odometer
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Main configurations
        • Advanced configurations
      • Android
        • Get started
        • Main configurations
        • Advanced configurations
  • DRIVER ACHIEVEMENT
    • Introduction
    • iOS
      • Get started
    • Android
      • Get Started
    • User interface
      • iOS
      • Android
  • CHALLENGE
    • Introduction
    • Important challenge rules
    • iOS
      • Get started
      • References (iOS)
    • Android
      • Get started
      • References (Android)
    • User interface
      • iOS
        • Get started
      • Android
        • Get started
  • GROUP
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
  • React Native
    • Get started
    • Integration
  • Flutter
    • Get started
    • Integration
  • Push services
    • Introduction
    • Push Trip Data
    • Push Deleted trip
    • Push Crash Data
    • Push Diagnosis Data
  • ADMIN SERVICES
    • Beacon
      • Add
      • Replace
      • Delete
      • Configuration
    • Challenges
      • List of challenges
      • Challenge details
      • Registered users
      • Challenge ranking
      • Users' progress
      • Definitions
    • Customer
      • Activity timeline
    • Driver
      • Timeline
      • Synthesis
      • Identity
      • Status
      • Add or update a metadata
      • Vehicles
      • Profile
      • Application diagnoses
    • Drivers
      • Account
      • Statistics
      • Ranking
      • Expired accounts
    • Group
      • Timeline
      • Synthesis
    • Trips
      • Add or update a metadata
      • Delete a metadata
    • Vehicle
      • Create
      • Characteristics
      • Configuration
      • Statistics
      • Update mileage
      • Tire and brake wear update
      • References
  • Crashes
    • Annotate a crash
    • Revoke crash location URL
  • ENTERPRISE SERVICES
    • Introduction
    • Teams
      • Create a team
      • List of teams
      • Enable or disable a team
    • Hyper-admins
      • Create a hyper-admin
      • List of hyper-admins
      • Delete a hyper-admin
    • Monitoring
      • Get a push trip data report
      • Get a push crash data report
      • Request to retry failed trips
      • Request to retry failed crashes
      • Get the status of a task
  • Release notes
    • Changelog
      • iOS
      • Android
      • UI iOS
      • UI Android
Powered by GitBook
On this page
  • Prerequisite
  • Integration
  • Get the framework
  • Initialization
  • Override colors and texts
  • Trip list main theme
  • Trip map items
  • Display view in navigation controller

Was this helpful?

Export as PDF
  1. DRIVER DATA
  2. User interface
  3. iOS

Get started

PreviousiOSNextAdvanced configurations

Last updated 1 year ago

Was this helpful?

Prerequisite

Before starting DriveKit Driver Data UI integration, make sure that you have and components, especially if you have .

Integration

Get the framework

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:

target 'my-target' do
  pod 'DriveKitDriverDataUI'
end

Then, run pod install.

On this , you also have a demo app and source code of Driver Data UI that you can use as an example.

Initialization

If you have , the Driver Data UI module must also be manually initialized. In the application's AppDelegate file, import DriveKitDriverDataUI:

import DriveKitDriverDataUI

Then, to initialize Driver Data UI SDK in your app, you must call the initialization method in didFinishLaunchingWithOptions method of your AppDelegate:

import DriveKitCore
import DriveKitCommonUI
import DriveKitDriverData
import DriveKitDriverDataUI

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    DriveKit.shared.initialize()
    DriveKitDriverData.shared.initialize()
    DriveKitUI.shared.initialize()
    DriveKitDriverDataUI.shared.initialize()
    ...    
}

Override colors and texts

Trip list main theme

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.

DriveKitDriverDataUI.shared.initialize(tripData: .safety)

The default value is safety.

Trip map items

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.

DriveKitDriverDataUI.shared.initialize(mapItems: [.safety, .ecoDriving, .distraction, .speeding, .interactiveMap, .synthesis])

The default value is:

[.safety, .ecoDriving, .distraction, .speeding, .interactiveMap, .synthesis]

The order in which the screens are displayed corresponds to the order of the items in the table. To hide a theme, simply do not add it to the table.

Display view in navigation controller

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.

let tripListVC = TripListVC()
self.navigationController?.pushViewController(tripListVC, animated: true)

To override colors and texts in Driver Data UI SDK, see .

Common UI configuration
initialized DriverData
Common UI
Github repository
Trip map items
disabled the SDK auto-initialization
disabled the SDK auto-initialization