Pass the object conforming to AATReportsDelegate to AATKit using static func setReportsDelegate(_ delegate: AATReportsDelegate).
extensionAppDelegate:AATReportsDelegate {funcconfigureAATKit() {let configuration =AATConfiguration() AATSDK.initAATKit(with: conf) AATSDK.setReportsDelegate(self)// Must be called after AATKit init }funconReportSent(_report: String) {// A report has been sent }}
@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