forked from ludei/atomic-plugins-ads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLDAdInterstitial.h
99 lines (78 loc) · 2.84 KB
/
LDAdInterstitial.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
#import <UIKit/UIKit.h>
@protocol LDAdInterstitialDelegate;
@protocol LDAdInterstitialProtocol;
/**
* The `LDAdInterstitial` class provides a full-screen advertisement UIViewController
*/
typedef NSObject<LDAdInterstitialProtocol> LDAdInterstitial;
@protocol LDAdInterstitialProtocol
/**
* The delegate (`LDAdInterstitialDelegate`) of the ad view.
*/
@property (nonatomic, weak) id<LDAdInterstitialDelegate> delegate;
/**
* Begins loading ad content for the interstitial.
* You can implement the `adInterstitialDidLoad:` and `adInterstitialDidFailLoad:` methods of
* `LDAdInterstitialDelegate` if you would like to be notified as loading succeeds or fails.
*/
- (void)loadAd;
/**
* Returns YES is the ad is ready to be displayed
**/
-(bool) isReady;
/**
* Shows the interstitial, if it is ready.
*
* @param controller The parent view controller.
* @param animated Animated transtition.
*/
- (void)showFromViewController:(UIViewController *)controller animated:(BOOL) animated;
/**
* Hides the interstitial.
*
* @param animated Animated transtition.
*/
- (void)dismissAnimated:(BOOL) animated;
@end
@protocol LDRewardedVideoRewardProtocol <NSObject>
@property (nonatomic, strong) NSString *currencyType;
@property (nonatomic, strong) NSNumber *amount;
@property (nonatomic, strong) NSString *itmKey;
@end
typedef NSObject<LDRewardedVideoRewardProtocol> LDRewardedVideoReward;
@protocol LDAdInterstitialDelegate<NSObject>
@optional
/**
* Sent when an interstitial successfully loads a new ad.
*
* @param interstitial The interstitial.
*/
-(void) adInterstitialDidLoad:(LDAdInterstitial *) interstitial;
/**
* Sent when an interstitial ad object fails to load an ad.
*
* @param interstitial The interstitial.
* @param error The reported error.
*/
-(void) adInterstitialDidFailLoad:(LDAdInterstitial *) interstitial withError:(NSError *) error;
/**
* Sent immediately before an interstitial ad object is presented on the screen.
* Your implementation of this method should pause any application activity that requires user interaction.
*
* @param interstitial The interstitial.
*/
- (void)adInterstitialWillAppear:(LDAdInterstitial *)interstitial;
/**
* Sent after an interstitial ad object has been dismissed from the screen, returning control to your application.
* Your implementation of this method should resume any application activity that was paused prior to the interstitial being presented on-screen.
*
* @param interstitial The interstitial.
*/
- (void)adInterstitialWillDisappear:(LDAdInterstitial *)interstitial;
/**
* Sent when a rewarded video interstitial is completed (either succeeded or skipped)
*
* @param interstitial The interstitial.
*/
- (void)adInterstitialDidCompleteRewardedVideo:(LDAdInterstitial *)interstitial withReward:(LDRewardedVideoReward*) reward andError:(NSError *) error;
@end