# 7. Permissions

To do proper detections, the Sentiance SDK requires a few permissions to be granted by the user at application runtime. The SDK does not ask for these permissions itself. Instead, after explaining to the user why you need each permission, you should present the permission dialogs as part of your application's onboarding flow.

## Location

To collection location data in the background, the SDK requires the **always** location permission. additionally, **Precise Location** must be enabled in the app's location settings.

{% hint style="warning" %}
Without the always location access permission, SDK detections will not work. This permission enables the to run in the background, and make use of [region monitoring](https://developer.apple.com/documentation/corelocation/monitoring_the_user_s_proximity_to_geographic_regions?changes=la\&language=objc).
{% endhint %}

## Motion & Fitness

To collect motion activity data, the SDK requires the Motion & Fitness permission.

{% hint style="warning" %}
This permission is not mandatory, but when granted, it can help improve the quality of detections. For example, the Sentiance SDK uses activity data to improve the detection of trip starts.
{% endhint %}

## Permission Considerations

Apple provides some useful tips about [Requesting Permissions](https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/requesting-permission/) as part of their Human Interface Guidelines.

In addition to that, below are the things to consider for an optimal user experience:

### Privacy

* Request personal data only when your app clearly needs it.
* Explain why your app needs the information.
  * When the application requests permission for background locations or motion activities, a message will be shown to the user. You must configure this message by setting the value for the following keys in `Info.plist`
    * `NSLocationAlwaysUsageDescription`
    * `NSLocationWhenInUseUsageDescription`
    * `NSLocationAlwaysAndWhenInUseUsageDescription`
    * `NSMotionUsageDescription`

![](/files/-LVoFErO4vJ_xyTYcUPJ)

{% hint style="success" %}
Keep the text short and specific, use sentence case, and be polite so people don't feel pressured. There’s no need to include your app name.
{% endhint %}

### Consistency

* Request permission at launch only when necessary for your app to function.
* Use the system-provided alerts.

### Efficiency

Don’t request location information unnecessarily.


---

# 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.sentiance.com/a-complete-integration/ios-sdk/7.-permissions.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.
