> For the complete documentation index, see [llms.txt](https://docs.drivequant.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drivequant.com/trip-analysis/user-interface/ios/location-sharing.md).

# Location sharing

Location sharing while driving provides peace of mind to family members. The graphical interface helps the user to enable location sharing and create a link that displays his location on a map to a friend or family member while driving.

The feature is implemented across three distinct screens:

1. **Introduction Screen:** The feature is disabled by default. The first screen explains the location-sharing principle.
2. **Duration Selection Screen:** On the second screen, the user can choose the duration for sharing his trip location. The available options include one day, one week, or one month.
3. **Active Sharing Screen:** The last screen confirms that location sharing is active. It includes a button that allows the user to generate and share a link displaying his real-time location. Additionally, it displays the remaining time before the link expires.

<figure><img src="/files/5fwS0FaU6pAaySt8hqQ9" alt=""><figcaption></figcaption></figure>

To integrate and display this feature within your application, invoke the following method:

```swift
DriveKitTripAnalysisUI.shared.getTripSharingViewController()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/trip-analysis/user-interface/ios/location-sharing.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.
