forked from tenjin/tenjin-ios-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTenjinSDK.h
257 lines (188 loc) · 8.44 KB
/
TenjinSDK.h
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
//
// Created by Tenjin on 2016-05-20.
// Version 1.12.24
// Copyright (c) 2016 Tenjin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
@interface TenjinSDK : NSObject
#pragma mark Initialization
- (instancetype)init NS_UNAVAILABLE;
// initialize the Tenjin SDK
+ (TenjinSDK *)init:(NSString *)apiToken __deprecated_msg("use `initialize`");
//initialize the Tenjin SDK with shared secret
+ (TenjinSDK *)init:(NSString *)apiToken
andSharedSecret:(NSString *)secret __deprecated_msg("use `initialize`");
//initialize the Tenjin SDK with app subversion
+ (TenjinSDK *)init:(NSString *)apiToken
andAppSubversion:(NSNumber *)subversion __deprecated_msg("use `initialize`");
//initialize the Tenjin SDK with shared secret and app subversion
+ (TenjinSDK *)init:(NSString *)apiToken
andSharedSecret:(NSString *)secret
andAppSubversion:(NSNumber *)subversion __deprecated_msg("use `initialize`");
// initialize the Tenjin SDK
+ (TenjinSDK *)initialize:(NSString *)apiToken;
//initialize the Tenjin SDK with shared secret
+ (TenjinSDK *)initialize:(NSString *)apiToken
andSharedSecret:(NSString *)secret;
//initialize the Tenjin SDK with app subversion
+ (TenjinSDK *)initialize:(NSString *)apiToken
andAppSubversion:(NSNumber *)subversion;
//initialize the Tenjin SDK with shared secret and app subversion
+ (TenjinSDK *)initialize:(NSString *)apiToken
andSharedSecret:(NSString *)secret
andAppSubversion:(NSNumber *)subversion;
- (id)initWithToken:(NSString *)apiToken
andSharedSecret:(NSString *)secret
andAppSubversion:(NSNumber *)subversion
andDeferredDeeplink:(NSURL *)url
ping:(BOOL)ping NS_DESIGNATED_INITIALIZER;
#pragma mark Singleton access
// initialize the Tenjin SDK
+ (TenjinSDK *)getInstance:(NSString *)apiToken;
//initialize the Tenjin SDK with shared secret
+ (TenjinSDK *)getInstance:(NSString *)apiToken
andSharedSecret:(NSString *)secret;
//initialize the Tenjin SDK with app subversion
+ (TenjinSDK *)getInstance:(NSString *)apiToken
andAppSubversion:(NSNumber *)subversion;
//initialize the Tenjin SDK with shared secret and app subversion
+ (TenjinSDK *)getInstance:(NSString *)apiToken
andSharedSecret:(NSString *)secret
andAppSubversion:(NSNumber *)subversion;
//initialize the Tenjin SDK + connect
+ (TenjinSDK *)sharedInstanceWithToken:(NSString *)apiToken __deprecated_msg("use `init` and `connect`");
//initialize the Tenjin SDK + connect with a third party deeplink
+ (TenjinSDK *)sharedInstanceWithToken:(NSString *)apiToken
andDeferredDeeplink:(NSURL *)url __deprecated_msg("use `init` and `connectWithDeferredDeeplink`");
//returns the shared Tenjin SDK instance
+ (TenjinSDK *)sharedInstance;
#pragma mark - Functionality
//use connect to send connect call. sharedInstanceWithToken automatically does a connect
+ (void)connect;
//use connect to send connect call. sharedInstanceWithToken automatically does a connect
+ (void)connectWithDeferredDeeplink:(NSURL *)url;
//use sendEventWithName for custom event names
+ (void)sendEventWithName:(NSString *)eventName;
//This method checks to make sure integers are passed as values.
+ (void)sendEventWithName:(NSString *)eventName
andEventValue:(NSString *)eventValue;
//This method is deprecated in favor of [transaction: andReceipt:], so Tenjin can verify your transactions
+ (void)transaction:(SKPaymentTransaction *)transaction __attribute__((deprecated));
//Use this method to submit a transaction to Tenjin, we will also attempt to verify it for our records
+ (void)transaction:(SKPaymentTransaction *)transaction
andReceipt:(NSData *)receipt;
//use transactionWithProductName... when you don't use Apple's SKPaymentTransaction and need to pass revenue directly
+ (void)transactionWithProductName:(NSString *)productName
andCurrencyCode:(NSString *)currencyCode
andQuantity:(NSInteger)quantity
andUnitPrice:(NSDecimalNumber *)price;
//use transactionWithProductName...when you don't use Apple's SKPaymentTransaction and need to pass revenue directly with a NSData binary receipt
+ (void)transactionWithProductName:(NSString *)productName
andCurrencyCode:(NSString *)currencyCode
andQuantity:(NSInteger)quantity
andUnitPrice:(NSDecimalNumber *)price
andTransactionId:(NSString *)transactionId
andReceipt:(NSData *)receipt;
//use this method when you want to pass in a base64 receipt instead of a NSData receipt
+ (void)transactionWithProductName:(NSString *)productName
andCurrencyCode:(NSString *)currencyCode
andQuantity:(NSInteger)quantity
andUnitPrice:(NSDecimalNumber *)price
andTransactionId:(NSString *)transactionId
andBase64Receipt:(NSString *)receipt;
//use this method to register the attribution callback
- (void)registerDeepLinkHandler:(void (^)(NSDictionary *params, NSError *error))deeplinkHandler;
//notify Tenjin of a new subscription purchase
- (void)handleSubscriptionPurchase:(SKPaymentTransaction *)transaction;
// GDPR opt-out
+ (void)optOut;
// GDPR opt-in
+ (void)optIn;
// GDPR opt-out of list of params
+ (void)optOutParams:(NSArray *)params;
// GDPR opt-in with list of params
+ (void)optInParams:(NSArray *)params;
// Appends app subversion to app version
+ (void)appendAppSubversion:(NSNumber *)subversion;
// deprecated
+ (void)updateSkAdNetworkConversionValue:(int)conversionValue __deprecated_msg("use `updatePostbackConversionValue:`");
//deprecated
+ (void)updateConversionValue:(int)conversionValue __deprecated_msg("use `updatePostbackConversionValue:`");
// Update conversion value
+ (void)updatePostbackConversionValue:(int)conversionValue;
// Update conversion value and coarse value (iOS 16.1+)
+ (void)updatePostbackConversionValue:(int)conversionValue
coarseValue:(NSString*)coarseValue;
// Update conversion value, coarse value and lock window (iOS 16.1+)
+ (void)updatePostbackConversionValue:(int)conversionValue
coarseValue:(NSString*)coarseValue
lockWindow:(BOOL)lockWindow;
// Set customer user id to send as parameter on each event request
+ (void)setCustomerUserId:(NSString *)userId;
// Get customer user id saved on the device
+ (NSString *)getCustomerUserId;
#pragma mark Util
+ (void)verboseLogs;
+ (void)debugLogs;
+ (void)setLogHandler:(void (^)(NSString *))handler;
+ (NSString *)sdkVersion;
+ (void)setWrapperVersion:(NSString *)wrapperVersion;
+ (void)setValue:(NSString *)value
forKey:(NSString *)key;
//deprecated
+ (void)registerAppForAdNetworkAttribution __deprecated_msg("use `updatePostbackConversionValue:`");
+ (void)requestTrackingAuthorizationWithCompletionHandler:(void (^)(NSUInteger status))completion;
- (void)getAttributionInfo:(void (^)(NSDictionary *attributionInfo, NSError *error))completionHandler;
@end
//
// Created by Tenjin
// Copyright (c) 2022 Tenjin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TenjinSDK.h"
@interface TenjinSDK (TopOnILRD)
+ (void)topOnImpressionFromDict:(NSDictionary *)adImpression;
+ (void)topOnImpressionFromJSON:(NSString *)jsonString;
@end
//
// Created by Tenjin
// Copyright (c) 2022 Tenjin. All rights reserved.
//
#import "TenjinSDK.h"
#import <Foundation/Foundation.h>
@interface TenjinSDK (AppLovinILRD)
+ (void)subscribeAppLovinImpressions;
+ (void)appLovinImpressionFromJSON:(NSString *)jsonString;
@end
//
// Created by Tenjin
// Copyright (c) 2022 Tenjin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TenjinSDK.h"
@interface TenjinSDK (HyperBidILRD)
+ (void)hyperBidImpressionFromDict:(NSDictionary *)adImpression;
+ (void)hyperBidImpressionFromJSON:(NSString *)jsonString;
@end
//
// Created by Tenjin
// Copyright (c) 2022 Tenjin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TenjinSDK.h"
@class GADAdValue;
@interface TenjinSDK (AdMobILRD)
+ (void)handleAdMobILRD:(NSObject *)adView :(GADAdValue *)adValue;
+ (void)adMobImpressionFromJSON:(NSString *)jsonString;
@end
//
// Created by Tenjin
// Copyright (c) 2022 Tenjin. All rights reserved.
//
#import "TenjinSDK.h"
#import <Foundation/Foundation.h>
@interface TenjinSDK (IronSourceILRD)
+ (void)subscribeIronSourceImpressions;
+ (void)ironSourceImpressionFromJSON:(NSString *)jsonString;
@end