> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/developer/sdk/ios/data-privacy/data-collection.md).

# Automatic data collection

By default, the Batch SDK will automatically collect some data related to the user's device:

<table><thead><tr><th width="164.21875">Native data</th><th>Description</th><th width="224.3515625" align="right">Default collection status</th><th width="160.890625" data-type="checkbox">Installation based data model</th><th data-type="checkbox">Profile based data model</th></tr></thead><tbody><tr><td>Device Model</td><td>The user's device model information</td><td align="right">false</td><td>true</td><td>false</td></tr><tr><td>Installation ID</td><td>The installation identifier</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Session ID</td><td>The user's session identifier</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Custom User ID</td><td>The user's custom identifier</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>API Level</td><td>The Batch SDK api level</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Messaging API Level</td><td>The Batch SDK Messaging api level</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Device Language</td><td>The user's device language</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Device Region</td><td>The user's device region</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Device Timezone</td><td>The user's device timezone</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>OS Version</td><td>The user's device iOS version</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>App Version (String)</td><td>The application version (string)</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>App Version (Build Number)</td><td>The application version (number)</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Bundle Name</td><td>The application bundle identifier</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Device Date</td><td>The current device date</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Device Installation Date</td><td>The Batch installation date</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Bridge Version</td><td>Version of the batch bridge (for cross-platform plugin only)</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Plugin Version</td><td>Version of the batch plugin (for cross-platform plugin only)</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>GeoIP</td><td>Whether Batch should resolve the user's location from ip address.</td><td align="right">false</td><td>true</td><td>false</td></tr></tbody></table>

Some of this data are disabled by default and can be toggled on/off according to the user consent:

* Device model
* GeoIP

Use the following API to fine-tune what you want to enable:

{% tabs %}
{% tab title="Swift" %}

```swift
BatchSDK.updateAutomaticDataCollection { config in
    // Enable GeoIP resolution on server side
    config.setGeoIPEnabled(true)
    // Enable automatic collection of the device model information
    config.setDeviceModelEnabled(true)
}
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
[BatchSDK updateAutomaticDataCollection:^(BatchDataCollectionConfig * _Nonnull config) {
  // Enable GeoIP resolution on server side
  [config setGeoIPEnabled:true];
  // Enable automatic collection of the device model information
  [config setDeviceModelEnabled:true];
}];
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
This API can be used at any time in your application lifecycle and Batch will remember these values, even if your Application reboots.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.batch.com/developer/sdk/ios/data-privacy/data-collection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
