-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAppsFlyerXAppleDelegate.mm
42 lines (34 loc) · 1.44 KB
/
AppsFlyerXAppleDelegate.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// AppsFlyerXAppleDelegate.m
// AppsFlyerCocos2dX-mobile
//
// Created by AndreyG-AF on 10/7/17.
//
#include "AppsFlyerXAppleHelper.h"
#include "AppsFlyerXAppleDelegate.h"
@implementation AppsFlyerXAppleDelegate
- (void)onConversionDataSuccess:(NSDictionary*)installData {
if (_onConversionDataReceivedCallback) {
_onConversionDataReceivedCallback(AppsFlyerXAppleHelper::nsDictionary2ValueMap(installData));
}
}
- (void)onConversionDataFail:(NSError *)error {
if (_onConversionDataRequestFailureCallback) {
NSDictionary * errorDictionary = @{@"errorCode":[NSNumber numberWithInteger:error.code],
@"errorDescription":error.localizedDescription};
_onConversionDataRequestFailureCallback(AppsFlyerXAppleHelper::nsDictionary2ValueMap(errorDictionary));
}
}
- (void)onAppOpenAttribution:(NSDictionary*)attributionData {
if (_onAppOpenAttributionCallback) {
_onAppOpenAttributionCallback(AppsFlyerXAppleHelper::nsDictionary2ValueMap(attributionData));
}
}
- (void) onAppOpenAttributionFailure:(NSError *)error {
if (_onAppOpenAttributionFailureCallback) {
NSDictionary * errorDictionary = @{@"errorCode":[NSNumber numberWithInteger:error.code],
@"errorDescription":error.localizedDescription};
_onAppOpenAttributionFailureCallback(AppsFlyerXAppleHelper::nsDictionary2ValueMap(errorDictionary));
}
}
@end