> For the complete documentation index, see [llms.txt](https://aatkit.gitbook.io/ios-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aatkit.gitbook.io/ios-integration/advanced/advanced-delegates/reports-delegate.md).

# Reports Delegate

Listen to AATKit reporting events

### Listen to Reports Events <a href="#listen-to-reports-events" id="listen-to-reports-events"></a>

* Initialise AATKit first.
* Conform to [AATReportsDelegate](https://docs.gravite.net/aatkit/ios/docs/documentation/aatkit/aatreportsdelegate).
* Pass the object conforming to `AATReportsDelegate` to AATKit using `static func setReportsDelegate(_ delegate: AATReportsDelegate)`.

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

```swift
extension AppDelegate: AATReportsDelegate {
    func configureAATKit() {
        let configuration = AATConfiguration()
        AATSDK.initAATKit(with: conf)
        AATSDK.setReportsDelegate(self) // Must be called after AATKit init    
    }
    
    func onReportSent(_ report: String) {
        // A report has been sent
    }
}
```

{% endtab %}

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

```objectivec
@interface AppDelegate () <AATReportsDelegate>
...
@end

@implementation AppDelegate
...
- (void)configureAATKit {
    AATConfiguration *configuration = [[AATConfiguration alloc] init];
    [AATSDK initAATKitWith:configuration];
    [AATSDK setReportsDelegate:self]; // Must be called after AATKit init    
}

- (void)onReportSent:(NSString * _Nonnull)report {
    // A report has been sent
}
@end
```

{% endtab %}
{% endtabs %}
