# \*SDK Delegates

{% hint style="info" %}
Applicable for SDK version 5.9.5 and higher
{% endhint %}

## RPLocationDelegate

Usage example:

```
@interface AppDelegate () <RPLocationDelegate> {
        [RPEntry instance].locationDelegate = self;
}
```

Delegate method:

```
- (void)onLocationChanged:(CLLocation *)location {
    // Enter your code here to use location objectfrom SDK
}

- (void)onNewEvents:(NSMutableArray *)events {
    for (RPEventPoint *temp in events) {
        NSString *tempString = self.loggerView.text;
        tempString = [NSString stringWithFormat:@"%@\n%@", tempString, temp.type];
        dispatch_async(dispatch_get_main_queue(), ^{
            [self.loggerView setText:tempString];
        });
    }
}
```

{% hint style="info" %}
Applicable for SDK version 5.8.0 and higher
{% endhint %}

## **RP**LowPowerMode**Delegate**

Usage exameple:

```
@interface AppDelegate () <RPLowPowerModeDelegate> {
        [RPEntry instance].lowPowerModeDelegate = self;
}
```

Delegate method:

```
- (void)lowPowerMode:(Boolean)state {
    if (state) {
        // You can create push in this place and fire about this, as example 
        
        UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
        content.title = @"Low Power Mode";
        content.body = [NSString stringWithFormat:@"Your trips may be not recorded. Please, follow to Settings=>Battery=>Low Power"];
        UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:1 repeats:NO];
        UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"overspeed" content:content trigger:trigger];

        [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:nil]; 
    }
}
```

## **RP**AccuracyAuthorization**Delegate**

Usage example:

```
@interface AppDelegate () <RPAccuracyAuthorizationDelegate> {
        [RPEntry instance].accuracyAuthorizationDelegate = self;
}
```

Delegate method:

```
- (void)wrongAccuracyAuthorization {
    // You can create push in this place and fire about this, as example 
        
    UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
    content.title = @"Precise Location is off";
    content.body = [NSString stringWithFormat:@"Your trips may be not recorded. Please, follow to App Settings=>Location=>Precise Location"];
    UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:1 repeats:NO];
    UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"overspeed" content:content trigger:trigger];

    [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:nil];

}
```

{% hint style="info" %}
Applicable for SDK version 5.7.0 and higher
{% endhint %}

## **RPLocationDelegate**

Usage example:

```
@interface AppDelegate () <RPLocationDelegate> {
        [RPEntry instance].locationDelegate = self;
}
```

Delegate method:

```
- (void)onLocationChanged:(CLLocation *)location {
    // Enter your code here to use location objectfrom SDK
}
```


---

# 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/sdk-delegates.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.
