# \*Configure Framework

### Set up Device Token (Log in)/ Remove Device Token (Log out)

```
if ([self userIsAuthenticated]) {
    [RPEntry instance].virtualDeviceToken = [self getDeviceToken];
} else {
    /// empty device token is not allowed
    /// Use removeVirtualDeviceToken method for log out from the host app.
    [[RPEntry instance] removeVirtualDeviceToken];
}
```

{% hint style="danger" %}
You can't set empty or nil token
{% endhint %}

{% hint style="danger" %}
Use removeVirtualDeviceToken method when the user logs out from the host app.
{% endhint %}

### Enable and disable Tracking (Optional)

If you want to disable or enable tracking, you can use property disableTracking of RPEntry class

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

```objectivec
[RPEntry instance].disableTracking = NO;  //enable tracking
[RPEntry instance].disableTracking = YES; //disable tracking
```

{% endtab %}

{% tab title="Swift" %}

```swift
RPEntry.instance().disableTracking = NO;  //enable tracking
RPEntry.instance().disableTracking = YES; //disable tracking
```

{% endtab %}
{% endtabs %}

### Enable and disable SDK (Optional)

Disable tracking doesn't disable SDK and it continues to send heartbeats (:point\_right: [Dataset](https://docs.telematicssdk.com/platform-features/heartbeats#fields-dictionary)). If you want to completely disable SDK, you should remove the Device Token

{% hint style="danger" %}
You can't set an empty or nil token
{% endhint %}

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

```objectivec
[RPEntry instance].disableTracking = YES;           //disable tracking
[[RPEntry instance] removeVirtualDeviceToken];      //remove token. 
```

{% endtab %}

{% tab title="Swift" %}

```swift
RPEntry.instance().disableTracking = YES;           //disable tracking
RPEntry.instance().removeVirtualDeviceToken();      //remove token. 
```

{% endtab %}
{% endtabs %}

### Enable Bluetooth OBD/ELM Functionality

Bluetooth OBD/ELM functionality enables the host app to work with Bluetooth OBD devices to get in-vehicle data (:point\_right:[Dataset](https://docs.telematicssdk.com/product-description/dataset/dataset-decription/bluetooth-obd)). To enable this, please use the method below:

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

```objectivec
[RPEntry enableELM:true]; 
```

{% endtab %}

{% tab title="Swift" %}

```swift
RPEntry.enableELM(true)
```

{% endtab %}
{% endtabs %}

### Enable high-frequency data collection (Accurate and persistent dataset)

{% hint style="info" %}
We strongly recommend keeping it enabled by default
{% endhint %}

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

```objectivec
[RPEntry enableHF:true];
```

{% endtab %}

{% tab title="Swift" %}

```swift
RPEntry.enableHF(true)
```

{% endtab %}
{% endtabs %}

### Enable Advertisement identifier

To enable Ads identifier, should provide Advertisement identifier to SDK. Please add these lines near the code from the previous section. Make sure, you added `import` section

**`#import <AdSupport/AdSupport.h>`**

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

```objectivec
if ([ASIdentifierManager sharedManager].isAdvertisingTrackingEnabled) {
    [RPEntry instance].advertisingIdentificator = [ASIdentifierManager sharedManager].advertisingIdentifier;
}
```

{% endtab %}

{% tab title="Swift" %}

```swift
if (ASIdentifierManager.shared().isAdvertisingTrackingEnabled) {
    RPEntry.instance().advertisingIdentifier = ASIdentifierManager.shared().advertisingIdentifier
}
```

{% endtab %}
{% endtabs %}


---

# 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-old.telematicssdk.com/sdk-installation/ios-sdk-intallation/configure-framework.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.
