hank
2017-09-04 9a3bc82de50bb34d5719adabbbd2a74f37d8e322
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
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
/*
 * Chartboost.h
 * Chartboost
 * 6.6.3
 *
 * Copyright 2011 Chartboost. All rights reserved.
 */
 
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
 
/*!
 @typedef NS_ENUM (NSUInteger, CBFramework)
 
 @abstract
 Used with setFramework:(CBFramework)framework calls to set suffix for
 wrapper libraries like Unity or Corona.
 */
typedef NS_ENUM(NSUInteger, CBFramework) {
    /*! Unity. */
    CBFrameworkUnity,
    /*! Corona. */
    CBFrameworkCorona,
    /*! Adobe AIR. */
    CBFrameworkAIR,
    /*! GameSalad. */
    CBFrameworkGameSalad,
    /*! Cordova. */
    CBFrameworkCordova,
    /*! CocoonJS. */
    CBFrameworkCocoonJS,
    /*! Cocos2d-x. */
    CBFrameworkCocos2dx,
    /*! Prime31Unreal. */
    CBFrameworkPrime31Unreal,
    /*! Weeby. */
    CBFrameworkWeeby,
    /*! Unknown. Other */
    CBFrameworkOther
};
 
/*!
 @typedef NS_ENUM (NSUInteger, CBMediation)
 
 @abstract
 Used with setMediation:(CBMediation)library calls to set mediation library name
 partners. If you don't see your library here, contact support.
 */
typedef NS_ENUM(NSUInteger, CBMediation) {
    /*! Unknown. Other */
    CBMediationOther,
    /*! AdMarvel */
    CBMediationAdMarvel,
    /*! Fuse */
    CBMediationFuse,
    /*! Fyber */
    CBMediationFyber,
    /*! HeyZap */
    CBMediationHeyZap,
    /*! MoPub */
    CBMediationMoPub,
    /*! Supersonic */
    CBMediationSupersonic,
    /*! AdMob */
    CBMediationAdMob,
    /*! HyprMX */
    CBMediationHyprMX,
    /*! AerServ */
    CBMediationAerServ
};
 
 
 
/*!
 @typedef NS_ENUM (NSUInteger, CBLoadError)
 
 @abstract
 Returned to ChartboostDelegate methods to notify of Chartboost SDK errors.
 */
typedef NS_ENUM(NSUInteger, CBLoadError) {
    /*! Unknown internal error. */
    CBLoadErrorInternal = 0,
    /*! Network is currently unavailable. */
    CBLoadErrorInternetUnavailable = 1,
    /*! Too many requests are pending for that location.  */
    CBLoadErrorTooManyConnections = 2,
    /*! Interstitial loaded with wrong orientation. */
    CBLoadErrorWrongOrientation = 3,
    /*! Interstitial disabled, first session. */
    CBLoadErrorFirstSessionInterstitialsDisabled = 4,
    /*! Network request failed. */
    CBLoadErrorNetworkFailure = 5,
    /*!  No ad received. */
    CBLoadErrorNoAdFound = 6,
    /*! Session not started. */
    CBLoadErrorSessionNotStarted = 7,
    /*! There is an impression already visible.*/
    CBLoadErrorImpressionAlreadyVisible = 8,
    /*! User manually cancelled the impression. */
    CBLoadErrorUserCancellation = 10,
    /*! No location detected. */
    CBLoadErrorNoLocationFound = 11,
    /*! Error downloading asset. */
    CBLoadErrorAssetDownloadFailure = 16,
    /*! Video Prefetching is not finished */
    CBLoadErrorPrefetchingIncomplete = 21,
    /*! Error Originating from the JS side of a Web View */
    CBLoadErrorWebViewScriptError = 22
};
 
/*!
 @typedef NS_ENUM (NSUInteger, CBClickError)
 
 @abstract
 Returned to ChartboostDelegate methods to notify of Chartboost SDK errors.
 */
typedef NS_ENUM(NSUInteger, CBClickError) {
    /*! Invalid URI. */
    CBClickErrorUriInvalid,
    /*! The device does not know how to open the protocol of the URI  */
    CBClickErrorUriUnrecognized,
    /*! User failed to pass the age gate. */
    CBClickErrorAgeGateFailure,
    /*! Unknown internal error */
    CBClickErrorInternal,
};
 
/*!
 @typedef NS_ENUM (NSUInteger, CBStatusBarBehavior)
 
 @abstract
 Used with setStatusBarBehavior:(CBStatusBarBehavior)statusBarBehavior calls to set how fullscreen ads should
 behave with regards to the status bar.
 */
typedef NS_ENUM(NSUInteger, CBStatusBarBehavior) {
    /*! Ignore status bar altogether; fullscreen ads will use the space of the status bar. */
    CBStatusBarBehaviorIgnore,
    /*! Respect the status bar partially; fullscreen ads will use the space of the status bar but any user interactive buttons will not. */
    CBStatusBarBehaviorRespectButtons,
    /*! Respect the status bar fully; fullscreen ads will not use the status bar space. */
    CBStatusBarBehaviorRespect
};
 
/*!
 @typedef CBLocation
 
 @abstract
 Defines standard locations to describe where Chartboost SDK features appear in game.
 
 @discussion Standard locations used to describe where Chartboost features show up in your game
 For best performance, it is highly recommended to use standard locations.
 
 Benefits include:
 - Higher eCPMs.
 - Control of ad targeting and frequency.
 - Better reporting.
 */
typedef NSString * const CBLocation;
 
/*! "Startup" - Initial startup of game. */
extern CBLocation const CBLocationStartup;
/*! "Home Screen" - Home screen the player first sees. */
extern CBLocation const CBLocationHomeScreen;
/*! "Main Menu" - Menu that provides game options. */
extern CBLocation const CBLocationMainMenu;
/*! "Game Screen" - Game screen where all the magic happens. */
extern CBLocation const CBLocationGameScreen;
/*! "Achievements" - Screen with list of achievements in the game. */
extern CBLocation const CBLocationAchievements;
/*! "Quests" - Quest, missions or goals screen describing things for a player to do. */
extern CBLocation const CBLocationQuests;
/*!  "Pause" - Pause screen. */
extern CBLocation const CBLocationPause;
/*! "Level Start" - Start of the level. */
extern CBLocation const CBLocationLevelStart;
/*! "Level Complete" - Completion of the level */
extern CBLocation const CBLocationLevelComplete;
/*! "Turn Complete" - Finishing a turn in a game. */
extern CBLocation const CBLocationTurnComplete;
/*! "IAP Store" - The store where the player pays real money for currency or items. */
extern CBLocation const CBLocationIAPStore;
/*! "Item Store" - The store where a player buys virtual goods. */
extern CBLocation const CBLocationItemStore;
/*! "Game Over" - The game over screen after a player is finished playing. */
extern CBLocation const CBLocationGameOver;
/*! "Leaderboard" - List of leaders in the game. */
extern CBLocation const CBLocationLeaderBoard;
/*! "Settings" - Screen where player can change settings such as sound. */
extern CBLocation const CBLocationSettings;
/*! "Quit" - Screen displayed right before the player exits a game. */
extern CBLocation const CBLocationQuit;
/*! "Default" - Supports legacy applications that only have one "Default" location */
extern CBLocation const CBLocationDefault;
 
@protocol ChartboostDelegate;
 
/*!
 @class Chartboost
 
 @abstract
 Provide methods to display and control Chartboost native advertising types.
 
 @discussion For more information on integrating and using the Chartboost SDK
 please visit our help site documentation at https://help.chartboost.com
 */
@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 
 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
 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
 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
 Determine if a locally cached "more applications" exists for the given CBLocation.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if there a locally cached "more applications", and NO if not.
 
 @discussion A return value of YES here indicates that the corresponding
 showMoreApps:(CBLocation)location method will present without making
 additional server requests to fetch data to present.
 */
+ (BOOL)hasMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Present an "more applications" 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 "more applications"
 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 "more applications" to present in the given CBLocation this method
 is a no-op.
 */
+ (void)showMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Present an "more applications" for the given CBLocation and inside the given UIViewController.
 
 @param viewController The UIViewController to display the "more applications" UI within.
 
 @param location The location for the Chartboost impression type.
 
 @discussion This method uses the same implementation logic as showMoreApps:(CBLocation)location 
 for loading the "more applications" data, but adds an optional viewController parameter. 
 The viewController object allows the "more applications" page to be presented modally in a specified
 view hierarchy. If the Chartboost API server is unavailable or there is no eligible "more applications" 
 to present in the given CBLocation this method is a no-op.
 */
+ (void)showMoreApps:(UIViewController *)viewController
            location:(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
 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;
 
#pragma mark - Advanced Configuration & Use
 
/*!
 @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 setFramework:Unity withVersion:4.6, setFrameworkVersion:5.2.1
 
 @param frameworkVersion 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)setFrameworkVersion:(NSString*)frameworkVersion __attribute__((deprecated("This method is deprecated, please use  + (void)setChartboostWrapperVersion:(NSString*)chartboostWrapperVersion instead")));
 
/*!
 @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.
 
 @param framework The suffx to send with all Chartboost API server requests.
 
 @discussion This is an internal method used via Chartboost's Unity and Corona SDKs
 to track their usage.
 */
+ (void)setFramework:(CBFramework)framework __attribute__((deprecated("This method is deprecated, please use  + (void)setFramework:(CBFramework)framework withVersion:(NSString *)version; instead")));
 
/*!
 @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 SDK should show a loading view while preparing to display the
 "more applications" UI.
 
 @param shouldDisplay YES if Chartboost should display a loading view, NO otherwise.
 
 @discussion Set to control if Chartboost SDK should show a loading view while
 preparing to display the "more applications" UI.
 
 Default is NO.
 */
+ (void)setShouldDisplayLoadingViewForMoreApps:(BOOL)shouldDisplay;
 
/*!
 @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
 Returns the version of the Chartboost SDK.
 */
+ (NSString*)getSDKVersion;
 
 
#pragma mark - Advanced Caching
 
/*!
 @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
 Cache an "more applications" 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 "more applications"
 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)cacheMoreApps:(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
 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;
 
 
@end
 
/*!
 @protocol ChartboostDelegate
 
 @abstract
 Provide methods and callbacks to receive notifications of when the Chartboost SDK
 has taken specific actions or to more finely control the Chartboost SDK.
 
 @discussion For more information on integrating and using the Chartboost SDK
 please visit our help site documentation at https://help.chartboost.com
 
 All of the delegate methods are optional.
 */
@protocol ChartboostDelegate <NSObject>
 
@optional
 
/*!
 @abstract
 Called after the SDK has been successfully initialized
 
 @param status The result of the initialization. YES if successful. NO if failed.
 
 @discussion Implement to be notified of when the initialization process has finished.
 */
 
- (void)didInitialize:(BOOL)status;
 
#pragma mark - Interstitial Delegate
 
/*!
 @abstract
 Called before requesting an interstitial via the Chartboost API server.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if execution should proceed, NO if not.
 
 @discussion Implement to control if the Charboost SDK should fetch data from
 the Chartboost API servers for the given CBLocation.  This is evaluated
 if the showInterstitial:(CBLocation) or cacheInterstitial:(CBLocation)location
 are called.  If YES is returned the operation will proceed, if NO, then the
 operation is treated as a no-op.
 
 Default return is YES.
 */
- (BOOL)shouldRequestInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called before an interstitial will be displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if execution should proceed, NO if not.
 
 @discussion Implement to control if the Charboost SDK should display an interstitial
 for the given CBLocation.  This is evaluated if the showInterstitial:(CBLocation)
 is called.  If YES is returned the operation will proceed, if NO, then the
 operation is treated as a no-op and nothing is displayed.
 
 Default return is YES.
 */
- (BOOL)shouldDisplayInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called after an interstitial has been displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an interstitial has
 been displayed on the screen for a given CBLocation.
 */
- (void)didDisplayInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called after an interstitial has been loaded from the Chartboost API
 servers and cached locally.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an interstitial has been loaded from the Chartboost API
 servers and cached locally for a given CBLocation.
 */
- (void)didCacheInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called after an interstitial has attempted to load from the Chartboost API
 servers but failed.
 
 @param location The location for the Chartboost impression type.
 
 @param error The reason for the error defined via a CBLoadError.
 
 @discussion Implement to be notified of when an interstitial has attempted to load from the Chartboost API
 servers but failed for a given CBLocation.
 */
- (void)didFailToLoadInterstitial:(CBLocation)location
                        withError:(CBLoadError)error;
 
/*!
 @abstract
 Called after a click is registered, but the user is not fowrwarded to the IOS App Store.
 
 @param location The location for the Chartboost impression type.
 
 @param error The reason for the error defined via a CBLoadError.
 
 @discussion Implement to be notified of when a click is registered, but the user is not fowrwarded 
 to the IOS App Store for a given CBLocation.
 */
- (void)didFailToRecordClick:(CBLocation)location
                   withError:(CBClickError)error;
 
/*!
 @abstract
 Called after an interstitial has been dismissed.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an interstitial has been dismissed for a given CBLocation.
 "Dismissal" is defined as any action that removed the interstitial UI such as a click or close.
 */
- (void)didDismissInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called after an interstitial has been closed.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an interstitial has been closed for a given CBLocation.
 "Closed" is defined as clicking the close interface for the interstitial.
 */
- (void)didCloseInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called after an interstitial has been clicked.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an interstitial has been click for a given CBLocation.
 "Clicked" is defined as clicking the creative interface for the interstitial.
 */
- (void)didClickInterstitial:(CBLocation)location;
 
/*!
 @abstract
 Called before an "more applications" will be displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if execution should proceed, NO if not.
 
 @discussion Implement to control if the Charboost SDK should display an "more applications"
 for the given CBLocation.  This is evaluated if the showMoreApps:(CBLocation)
 is called.  If YES is returned the operation will proceed, if NO, then the
 operation is treated as a no-op and nothing is displayed.
 
 Default return is YES.
 */
- (BOOL)shouldDisplayMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Called after an "more applications" has been displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an "more applications" has
 been displayed on the screen for a given CBLocation.
 */
- (void)didDisplayMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Called after an "more applications" has been loaded from the Chartboost API
 servers and cached locally.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an "more applications" has been loaded from the Chartboost API
 servers and cached locally for a given CBLocation.
 */
- (void)didCacheMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Called after an "more applications" has been dismissed.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an "more applications" has been dismissed for a given CBLocation.
 "Dismissal" is defined as any action that removed the "more applications" UI such as a click or close.
 */
- (void)didDismissMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Called after an "more applications" has been closed.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an "more applications" has been closed for a given CBLocation.
 "Closed" is defined as clicking the close interface for the "more applications".
 */
- (void)didCloseMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Called after an "more applications" has been clicked.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an "more applications" has been clicked for a given CBLocation.
 "Clicked" is defined as clicking the creative interface for the "more applications".
 */
- (void)didClickMoreApps:(CBLocation)location;
 
/*!
 @abstract
 Called after an "more applications" has attempted to load from the Chartboost API
 servers but failed.
 
 @param location The location for the Chartboost impression type.
 
 @param error The reason for the error defined via a CBLoadError.
 
 @discussion Implement to be notified of when an "more applications" has attempted to load from the Chartboost API
 servers but failed for a given CBLocation.
 */
- (void)didFailToLoadMoreApps:(CBLocation)location
                    withError:(CBLoadError)error;
 
#pragma mark - Rewarded Video Delegate
 
/*!
 @abstract
 Called before a rewarded video will be displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @return YES if execution should proceed, NO if not.
 
 @discussion Implement to control if the Charboost SDK should display a rewarded video
 for the given CBLocation.  This is evaluated if the showRewardedVideo:(CBLocation)
 is called.  If YES is returned the operation will proceed, if NO, then the
 operation is treated as a no-op and nothing is displayed.
 
 Default return is YES.
 */
- (BOOL)shouldDisplayRewardedVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after a rewarded video has been displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a rewarded video has
 been displayed on the screen for a given CBLocation.
 */
- (void)didDisplayRewardedVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after a rewarded video has been loaded from the Chartboost API
 servers and cached locally.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a rewarded video has been loaded from the Chartboost API
 servers and cached locally for a given CBLocation.
 */
- (void)didCacheRewardedVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after a rewarded video has attempted to load from the Chartboost API
 servers but failed.
 
 @param location The location for the Chartboost impression type.
 
 @param error The reason for the error defined via a CBLoadError.
 
 @discussion Implement to be notified of when an rewarded video has attempted to load from the Chartboost API
 servers but failed for a given CBLocation.
 */
- (void)didFailToLoadRewardedVideo:(CBLocation)location
                         withError:(CBLoadError)error;
 
/*!
 @abstract
 Called after a rewarded video has been dismissed.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a rewarded video has been dismissed for a given CBLocation.
 "Dismissal" is defined as any action that removed the rewarded video UI such as a click or close.
 */
- (void)didDismissRewardedVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after a rewarded video has been closed.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a rewarded video has been closed for a given CBLocation.
 "Closed" is defined as clicking the close interface for the rewarded video.
 */
- (void)didCloseRewardedVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after a rewarded video has been clicked.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a rewarded video has been click for a given CBLocation.
 "Clicked" is defined as clicking the creative interface for the rewarded video.
 */
- (void)didClickRewardedVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after a rewarded video has been viewed completely and user is eligible for reward.
 
 @param reward The reward for watching the video.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a rewarded video has been viewed completely and user is eligible for reward.
 */
- (void)didCompleteRewardedVideo:(CBLocation)location
                      withReward:(int)reward;
 
#pragma mark - InPlay Delegate
 
/*!
 @abstract
 Called after an InPlay object has been loaded from the Chartboost API
 servers and cached locally.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when an InPlay object has been loaded from the Chartboost API
 servers and cached locally for a given CBLocation.
 */
- (void)didCacheInPlay:(CBLocation)location;
 
/*!
 @abstract
 Called after a InPlay has attempted to load from the Chartboost API
 servers but failed.
 
 @param location The location for the Chartboost impression type.
 
 @param error The reason for the error defined via a CBLoadError.
 
 @discussion Implement to be notified of when an InPlay has attempted to load from the Chartboost API
 servers but failed for a given CBLocation.
 */
- (void)didFailToLoadInPlay:(CBLocation)location
                  withError:(CBLoadError)error;
 
#pragma mark - General Delegate
 
/*!
 @abstract
 Called before a video has been displayed on the screen.
 
 @param location The location for the Chartboost impression type.
 
 @discussion Implement to be notified of when a video will
 be displayed on the screen for a given CBLocation.  You can then do things like mute
 effects and sounds.
 */
- (void)willDisplayVideo:(CBLocation)location;
 
/*!
 @abstract
 Called after the App Store sheet is dismissed, when displaying the embedded app sheet.
 
 @discussion Implement to be notified of when the App Store sheet is dismissed.
 */
- (void)didCompleteAppStoreSheetFlow;
 
/*!
 @abstract
 Called if Chartboost SDK pauses click actions awaiting confirmation from the user.
 
 @discussion Use this method to display any gating you would like to prompt the user for input.
 Once confirmed call didPassAgeGate:(BOOL)pass to continue execution.
 */
- (void)didPauseClickForConfirmation;
 
@end