Pass the object conforming to AATReportsDelegate to AATKit using static func setReportsDelegate(_ delegate: AATReportsDelegate).
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
}
}
@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