-
Notifications
You must be signed in to change notification settings - Fork 221
Expand file tree
/
Copy pathRNAppsFlyer.h
More file actions
executable file
·76 lines (62 loc) · 3.41 KB
/
RNAppsFlyer.h
File metadata and controls
executable file
·76 lines (62 loc) · 3.41 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#if __has_include(<React/RCTBridgeModule.h>) //ver >= 0.40
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
#import <React/RCTEventDispatcher.h>
#else //ver < 0.40
#import "RCTBridgeModule.h"
#import "RCTEventDispatcher.h"
#endif
#import "AppsFlyerAttribution.h"
#import <objc/message.h>
#if __has_include(<AppsFlyerLib/AppsFlyerLib.h>) // from Pod
#import <AppsFlyerLib/AppsFlyerLib.h>
#else
#import "AppsFlyerLib.h"
#endif
@interface RNAppsFlyer: RCTEventEmitter <RCTBridgeModule, AppsFlyerLibDelegate, AppsFlyerDeepLinkDelegate>
@property (readwrite, nonatomic) BOOL isManualStart;
@end
static NSString *const kAppsFlyerPluginVersion = @"6.17.9";
static NSString *const NO_DEVKEY_FOUND = @"No 'devKey' found or its empty";
static NSString *const NO_APPID_FOUND = @"No 'appId' found or its empty";
static NSString *const NO_EVENT_NAME_FOUND = @"No 'eventName' found or its empty";
static NSString *const EMPTY_OR_CORRUPTED_LIST = @"No arguments found or list is corrupted";
static NSString *const AF_SUCCESS = @"Success";
static NSString *const INVALID_URI = @"Invalid URI";
static NSString *const IOS_14_ONLY = @"Feature only supported on iOS 14 and above";
// Appsflyer JS objects
#define afDevKey @"devKey"
#define afAppId @"appId"
#define afIsDebug @"isDebug"
#define timeToWaitForATTUserAuthorization @"timeToWaitForATTUserAuthorization"
#define afEmailsCryptType @"emailsCryptType"
#define afEmails @"emails"
// Appsflyer native objects
#define afConversionData @"onInstallConversionDataListener"
#define afOnInstallConversionData @"onInstallConversionData"
#define afSuccess @"success"
#define afFailure @"failure"
#define afOnAttributionFailure @"onAttributionFailure"
#define afOnAppOpenAttribution @"onAppOpenAttribution"
#define afOnInstallConversionFailure @"onInstallConversionFailure"
#define afOnInstallConversionDataLoaded @"onInstallConversionDataLoaded"
#define afDeepLink @"onDeepLinkListener"
#define afOnDeepLinking @"onDeepLinking"
#define afOnValidationResult @"onValidationResult"
// User Invites, Cross Promotion
#define afCpAppID @"crossPromotedAppId"
#define afUiChannel @"channel"
#define afUiCampaign @"campaign"
#define afUiRefName @"referrerName"
#define afUiImageUrl @"referrerImageUrl"
#define afUiCustomerID @"customerID"
#define afUiBaseDeepLink @"baseDeepLink"
//RECEIPT VALIDATION
#define afProductIdentifier @"productIdentifier"
#define afTransactionId @"transactionId"
#define afPrice @"price"
#define afCurrency @"currency"
#define afAdditionalParameters @"additionalParameters"
static NSString *const NO_PARAMETERS_ERROR = @"No purchase parameters found";
static NSString *const VALIDATE_SUCCESS = @"In-App Purchase Validation success";
static NSString *const VALIDATE_FAILED = @"In-App Purchase Validation failed with error: ";