# Get started

## Prerequisite

Before starting DriveKit Timeline UI integration, make sure that you have initialized [Driver Data](https://docs.drivequant.com/driver-data/ios/get-started) and[ Common UI](https://docs.drivequant.com/common-ui/ios/get-started) modules.

## Integration

To add the Timeline UI module to your app using **Swift Package Manager**, add `DriveKitDriverDataTimelineUI` from repository: `https://github.com/DriveQuantPublic/drivekit-ui-ios.git` as dependency.

{% hint style="info" %}
On[ this Github repository](https://github.com/DriveQuantPublic/drivekit-ui-ios), you can also find a demo application that contains the DriveKit timeline component. This code is open source and you can use it as an example.
{% endhint %}

## Initialization

If you have [disabled the SDK auto-initialization](/get-started-drivekit/ios/advanced-configurations.md#manually-initialize-the-sdk), the Timeline UI module must also be manually initialized. In the application's AppDelegate file, import `DriveKitDriverDataTimelineUI`:

```swift
import DriveKitDriverDataTimelineUI
```

Then, to initialize Timeline UI module in your app, you must call the initialization method in `didFinishLaunchingWithOptions` method of your AppDelegate:

```swift
import DriveKitCore
import DriveKitCommonUI
import DriveKitDriverDataTimelineUI
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  DriveKit.shared.initialize()
  DriveKitUI.shared.initialize()
  DriveKitDriverData.shared.initialize()
  DriveKitDriverDataTimelineUI.shared.initialize()
  //...
}
```

## Configure main screen scores

You can select which scores you want to display on the main screen as well as the scores ordering, by calling the following method:

```swift
DriveKitUI.shared.scores = [.safety, .ecoDriving, .distraction, .speeding]
```

Default and accepted values:

\[ `.safety`, `.ecoDriving`, `.distraction`, `.speeding` ]

{% hint style="warning" %}
For `.distraction` and `.speeding` scores, make sure that the services are activated on your DriveQuant account or the SDK will filter them out and they will not be displayed in the UI even if you add them here.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.drivequant.com/driver-data-timeline-ui/ios/get-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
