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
  • Vehicle type
  • Vehicle selection mode
  • Selection of the auto start mode
  • Vehicle mileage tracking and editing
  • Enable mileage tracking
  • Display mileage tracking

Was this helpful?

Export as PDF
  1. Vehicle
  2. User interface
  3. iOS

Main configurations

PreviousGet startedNextAdvanced configurations

Last updated 1 year ago

Was this helpful?

Vehicle type

The UI vehicle module allows the selection of two vehicle types: (1) cars and (2) trucks. The selection of user-configurable vehicle types is performed via the DKVehicleTypes enum.

You can define vehicle types to be used by calling the following method:

DriveKitVehiculeUI.shared.configureVehicleTypes(types: [.car, .truck])

Settings:

  • .car

  • .truck

Default value: [.car, .truck]

If an empty array is set, previous configured values will be kept.

Vehicle selection mode

DriveKit Vehicle UI allows you to choose between two types of vehicle selection modes with the DKCategoryConfigType variable.

You can choose which mode you want to use by calling the following method:

DriveKitVehiculeUI.shared.configureCategoryConfigType(type: DKCategoryConfigType)

Settings:

  • liteConfigOnly: the driver simply selects a default vehicle model corresponding to a category (city car, sedan, utility vehicle, etc.). The characteristics of the vehicle will be those of a default model chosen to represent this vehicle category.

  • brandsConfigOnly: the process of adding a vehicle requires more steps that lead to the exact selection of the user's vehicle.

  • bothConfig: both modes are available to the user. The user starts by selecting a vehicle category. If he wishes, he can stop at this stage, otherwise he can proceed with the other steps.

Default value: bothConfig

Selection of the auto start mode

The SDK allows 4 configurations for the automatic start of the trip analysis. This configuration is controlled via DKDetectionMode.

You can choose which detection mode(s) to display by calling the following method:

DriveKitVehicleUI.shared.configureDetectionModes(detectionModes: [DKDetectionMode])

Settings:

  • disabled

  • gps

  • beacon

  • bluetooth

Default value: [ disabled, gps, beacon, bluetooth ]

Vehicle mileage tracking and editing

The vehicle UI component includes a simple and powerful feature to automatically track vehicle mileage and manually add a mileage record. The mileage computation is based on the sum of the trip distances for all the trips recorded automatically.

If some trips are lost or if you notice a difference between the mileage measured by the SDK and the mileage displayed on the vehicle's odometer, it is possible to correct the value and manually add the real value.

Enable mileage tracking

By default, the mileage tracking feature is disabled, if you wish to enable it, simply use the method below:

DriveKitVehicleUI.shared.enableOdometer(true)

Display mileage tracking

To get the UIViewController showing the odometer of each of your vehicles, call the following method:

import DriveKitVehicleUI
...
DriveKitVehicleUI.shared.getOdometerUI()

This screen will present the odometer of the first vehicle of the list (sorted alphabetically), and it is then possible to select another vehicle.

If you want to directly show the odometer of a particular vehicle, you can pass the vehicle identifier of this vehicle in parameters:

import DriveKitVehicleUI
...
DriveKitVehicleUI.shared.getOdometerUI(vehicleId: <id_of_the_vehicle>)
Method to select a generic vehicle from its category
Method to select a vehicle from its brand, version and model