hank
2018-08-30 ad49a2cc084535e652d91d5371ebbffc286c58bc
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
//
//  Chartboost.h
//  Chartboost
//
//  Copyright 2018 Chartboost. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ChartboostDelegate.h"
@class CBInPlay;
@interface Chartboost : NSObject
#pragma mark - Main Chartboost API
 
/*!
 @abstract
 Start Chartboost with required appId, appSignature and delegate.
 
 @param appId The Chartboost application ID for this application.
 
 @param appSignature The Chartboost application signature for this application.
 
 @param delegate The delegate instance to receive Chartboost SDK callbacks.
 
 @discussion This method must be executed before any other Chartboost SDK methods can be used.
 Once executed this call will also controll session tracking and background tasks
 used by Chartboost.
 */
+ (void)startWithAppId:(NSString*)appId
          appSignature:(NSString*)appSignature
              delegate:(id<ChartboostDelegate>)delegate;
 
 
/*!
 @abstract
 Returns the version of the Chartboost SDK.
 */
+ (NSString*)getSDKVersion;
 
/*!
 @abstract
 Set the logging level
 
 @param loggingLevel The minimum level that's going to be logged
 
 @discussion Logging by default is off.
 */
 
+ (void)setLoggingLevel:(CBLoggingLevel)loggingLevel;
 
/*!
 @abstract
 Check to see if any views are visible
 
 @return YES if there is any view visible
 
 @discussion This method can be used to check if any chartboost ad's are visible on the app.
 */
+ (BOOL)isAnyViewVisible;
 
/*!
 @abstract
 Determine if a locally cached interstitial exists for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if there a locally cached interstitial, and NO if not.
 
 @discussion A return value of YES here indicates that the corresponding
 showInterstitial:(CBLocation)location method will present without making
 additional Chartboost API server requests to fetch data to present.
 */
+ (BOOL)hasInterstitial:(CBLocation)location;
/*!
 @abstract
 Determine if a locally cached rewarded video exists for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if there a locally cached rewarded video, and NO if not.
 
 @discussion A return value of YES here indicates that the corresponding
 showRewardedVideo:(CBLocation)location method will present without making
 additional Chartboost API server requests to fetch data to present.
 */
+ (BOOL)hasRewardedVideo:(CBLocation)location;
/*!
 @abstract
 Determine if a locally cached InPlay object exists for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if there a locally cached InPlay object, and NO if not.
 
 @discussion A return value of YES here indicates that the corresponding
 getInPlay:(CBLocation)location method will return an InPlay object without making
 additional Chartboost API server requests to fetch data to present.
 */
+ (BOOL)hasInPlay:(CBLocation)location;
 
/*!
 @abstract
 Cache an interstitial at the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method will first check if there is a locally cached interstitial
 for the given CBLocation and, if found, will do nothing. If no locally cached data exists
 the method will attempt to fetch data from the Chartboost API server.
 */
+ (void)cacheInterstitial:(CBLocation)location;
/*!
 @abstract
 Present an interstitial for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method will first check if there is a locally cached interstitial
 for the given CBLocation and, if found, will present using the locally cached data.
 If no locally cached data exists the method will attempt to fetch data from the
 Chartboost API server and present it.  If the Chartboost API server is unavailable
 or there is no eligible interstitial to present in the given CBLocation this method
 is a no-op.
 */
+ (void)showInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Cache a rewarded video at the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method will first check if there is a locally cached rewarded video
 for the given CBLocation and, if found, will do nothing. If no locally cached data exists
 the method will attempt to fetch data from the Chartboost API server.
 */
+ (void)cacheRewardedVideo:(CBLocation)location;
 
 
 
/*!
 @abstract
 Present a rewarded video for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method will first check if there is a locally cached rewarded video
 for the given CBLocation and, if found, will present it using the locally cached data.
 If no locally cached data exists the method will attempt to fetch data from the
 Chartboost API server and present it.  If the Chartboost API server is unavailable
 or there is no eligible rewarded video to present in the given CBLocation this method
 is a no-op.
 */
+ (void)showRewardedVideo:(CBLocation)location;
/*!
 @abstract
 Cache a number of InPlay objects for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method will first check if there is a locally cached InPlay object set
 for the given CBLocation and, if found, will do nothing. If no locally cached data exists
 the method will attempt to fetch data from the Chartboost API server.
 */
+ (void)cacheInPlay:(CBLocation)location;
 
 
/*!
 @abstract
 Return an InPlay object for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return CBInPlay object if one exists in the InPlay cache or nil if one is not yet available.
 
 @discussion This method will first check if there is a locally cached InPlay object
 for the given CBLocation and, if found, will return the object using the locally cached data.
 If no locally cached data exists the method will attempt to fetch data from the
 Chartboost API server.  If the Chartboost API server is unavailable
 or there is no eligible InPlay object to present in the given CBLocation this method
 is a no-op.
 */
+ (CBInPlay *)getInPlay:(CBLocation)location;
 
#pragma mark - Advanced Configuration & Use
/*!
 @abstract
 Set the Chartboost Delegate
 
 @param del The new Chartboost Delegate for the sharedChartboost instance
 
 @discussion This doesn't need to be called when calling startWithAppID, only later
 to switch the delegate object.
 */
+ (void)setDelegate:(id<ChartboostDelegate>)del;
 
/*!
 @abstract
 Confirm if an age gate passed or failed. When specified Chartboost will wait for
 this call before showing the IOS App Store.
 
 @param pass The result of successfully passing the age confirmation.
 
 @discussion If you have configured your Chartboost experience to use the age gate feature
 then this method must be executed after the user has confirmed their age.  The Chartboost SDK
 will halt until this is done.
 */
+ (void)didPassAgeGate:(BOOL)pass;
 
/*!
 @abstract
 Opens a "deep link" URL for a Chartboost Custom Scheme.
 
 @param url The URL to open.
 
 @param sourceApplication The application that originated the action.
 
 @return YES if Chartboost SDK is capable of handling the URL and does so, and NO if not.
 
 @discussion If you have configured a custom scheme and provided "deep link" URLs that the
 Chartboost SDK is capable of handling you should use this method in your ApplicationDelegate
 class methods that handle custom URL schemes.
 */
+ (BOOL)handleOpenURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication;
 
/*!
 @abstract
 Opens a "deep link" URL for a Chartboost Custom Scheme.
 
 @param url The URL to open.
 
 @param sourceApplication The application that originated the action.
 
 @param annotation The provided annotation.
 
 @return YES if Chartboost SDK is capable of handling the URL and does so, and NO if not.
 
 @discussion If you have configured a custom scheme and provided "deep link" URLs that the
 Chartboost SDK is capable of handling you should use this method in your ApplicationDelegate
 class methods that handle custom URL schemes.
 */
+ (BOOL)handleOpenURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication
           annotation:(id)annotation;
 
/*!
 @abstract
 Set a custom identifier to send in the POST body for all Chartboost API server requests.
 
 @param customId The identifier to send with all Chartboost API server requests.
 
 @discussion Use this method to set a custom identifier that can be used later in the Chartboost
 dashboard to group information by.
 */
+ (void)setCustomId:(NSString *)customId;
 
/*!
 @abstract
 Get the current custom identifier being sent in the POST body for all Chartboost API server requests.
 
 @return The identifier being sent with all Chartboost API server requests.
 
 @discussion Use this method to get the custom identifier that can be used later in the Chartboost
 dashboard to group information by.
 */
+ (NSString *)getCustomId;
 
/*!
 @abstract
 Set a custom version to append to the POST body of every request. This is useful for analytics and provides chartboost with important information.
 example: [Chartboost setChartboostWrapperVersion:@"6.4.6"];
 
 @param chartboostWrapperVersion The version sent as a string.
 
 @discussion This is an internal method used via Chartboost's Unity and Corona SDKs
 to track their usage.
 */
+ (void)setChartboostWrapperVersion:(NSString*)chartboostWrapperVersion;
 
/*!
 @abstract
 Set a custom framework suffix to append to the POST headers field.
 example setFramework:Unity withVersion:4.6, setFrameworkVersion:5.2.1
 
 @param framework The suffix to send with all Chartbooost API server requets.
 @param version The platform version used for analytics. Example Unity should set Application.unityVersion
 
 @discussion This is an internal method used via Chartboost's Unity and Corona SDKs
 to track their usage.
 */
+ (void)setFramework:(CBFramework)framework withVersion:(NSString *)version;
 
/*!
 @abstract
 Set a custom mediation library to append to the POST body of every request.
 example setMediation:CBMediationMoPub withVersion:@"3.8.0"
 
 @param library The constant for the name of the mediation library.
 @param libraryVersion The version sent as a string.
 
 @discussion This is an internal method used by mediation partners to track their usage.
 */
+ (void)setMediation:(CBMediation)library withVersion:(NSString*)libraryVersion;
 
/*!
 @abstract
 Decide if Chartboost SDK should show interstitials in the first session.
 
 @param shouldRequest YES if allowed to show interstitials in first session, NO otherwise.
 
 @discussion Set to control if Chartboost SDK can show interstitials in the first session.
 The session count is controlled via the startWithAppId:appSignature:delegate: method in the Chartboost
 class.
 
 Default is YES.
 */
+ (void)setShouldRequestInterstitialsInFirstSession:(BOOL)shouldRequest;
 
/*!
 @abstract
 Decide if Chartboost SDK should block for an age gate.
 
 @param shouldPause YES if Chartboost should pause for an age gate, NO otherwise.
 
 @discussion Set to control if Chartboost SDK should block for an age gate.
 
 Default is NO.
 */
+ (void)setShouldPauseClickForConfirmation:(BOOL)shouldPause;
 
 
/*!
 @abstract
 Decide if Chartboost SDKK will attempt to fetch videos from the Chartboost API servers.
 
 @param shouldPrefetch YES if Chartboost should prefetch video content, NO otherwise.
 
 @discussion Set to control if Chartboost SDK control if videos should be prefetched.
 
 Default is YES.
 */
+ (void)setShouldPrefetchVideoContent:(BOOL)shouldPrefetch;
 
/*!
 @abstract
 Set to enable and disable the auto cache feature (Enabled by default).
 
 @param shouldCache The param to enable or disable auto caching.
 
 @discussion If set to YES the Chartboost SDK will automatically attempt to cache an impression
 once one has been consumed via a "show" call.  If set to NO, it is the responsibility of the
 developer to manage the caching behavior of Chartboost impressions.
 */
+ (void)setAutoCacheAds:(BOOL)shouldCache;
 
/*!
 @abstract
 Get the current auto cache behavior (Enabled by default).
 
 @return YES if the auto cache is enabled, NO if it is not.
 
 @discussion If set to YES the Chartboost SDK will automatically attempt to cache an impression
 once one has been consumed via a "show" call.  If set to NO, it is the responsibility of the
 developer to manage the caching behavior of Chartboost impressions.
 */
+ (BOOL)getAutoCacheAds;
 
/*!
 @abstract
 Set to control how the fullscreen ad units should interact with the status bar. (CBStatusBarBehaviorIgnore by default).
 
 @param statusBarBehavior The param to set if fullscreen video should respect the status bar.
 
 @discussion See the enum value comments for descriptions on the values and their behavior.  Only use this feature if your
 application has the status bar enabled.
 */
+ (void)setStatusBarBehavior:(CBStatusBarBehavior)statusBarBehavior;
 
 
/*!
 @abstract
 returns YES if auto IAP tracking is enabled, NO if it isn't.
 
 @discussion Call to check if automatic tracking of in-app purchases is enabled.
 The setting is controlled by the server.
 */
+ (BOOL)getAutoIAPTracking;
 
/*!
 @abstract
 Mute/unmute chartboost ads.
 @param mute YES all sounds, NO activates them. Default is NO
 @discussion default value is NO
 */
+ (void)setMuted:(BOOL)mute;
 
/*!
 @abstract
 Set to restrict Chartboost's ability to collect personal data from the device. When this is set to YES. IDFA and ip address will not
 be collected by the SDK or the server. Use this to communicate an EEU Data Subject's preference regarding data collection.
 Note: This method should be called before starting the Chartboost SDK with startWithAppId:appSignature:delegate.
 @param restrict: Whether to restrict data collection or not
 @discussion Default value is NOT
 */
+ (void)restrictDataCollection:(BOOL)shouldRestrict;
 
#pragma mark - Deprecated
+ (BOOL)hasMoreApps:(CBLocation)location  __attribute__((deprecated("This method is deprecated will always return false")));
+ (void)showMoreApps:(CBLocation)location __attribute__((deprecated("This method is deprecated and is a no-op")));
+ (void)showMoreApps:(UIViewController *)viewController
            location:(CBLocation)location  __attribute__((deprecated("This method is deprecated and is a no-op")));
+ (void)setShouldDisplayLoadingViewForMoreApps:(BOOL)shouldDisplay __attribute__((deprecated("This method is deprecated and is a no-op")));
+ (void)cacheMoreApps:(CBLocation)location __attribute__((deprecated("This method is deprecated and is a no-op")));
 
@end