lpw
6 hours ago bdfd7f6dba1f69e912933e3397ac211be76039b4
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
//
//  WAAdMobProxy.h
//  WASdkIntf
//
//  Created by lpw on 2024/5/27.
//  Copyright © 2024 GHW-T-01. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
 
 
 
NS_ASSUME_NONNULL_BEGIN
 
 
@protocol GADFullScreenContentDelegate;
 
/// Protocol for ads that present full screen content.
@protocol GADFullScreenPresentingAd <NSObject>
 
/// Delegate object that receives full screen content messages.
@property(nonatomic, weak, nullable) id<GADFullScreenContentDelegate> fullScreenContentDelegate;
 
@end
 
/// Delegate methods for receiving notifications about presentation and dismissal of full screen
/// content. Full screen content covers your application's content. The delegate may want to pause
/// animations or time sensitive interactions. Full screen content may be presented in the following
/// cases:
/// 1. A full screen ad is presented.
/// 2. An ad interaction opens full screen content.
@protocol GADFullScreenContentDelegate <NSObject>
 
@optional
 
/// Tells the delegate that an impression has been recorded for the ad.
- (void)adDidRecordImpression:(nonnull id<GADFullScreenPresentingAd>)ad;
 
/// Tells the delegate that a click has been recorded for the ad.
- (void)adDidRecordClick:(nonnull id<GADFullScreenPresentingAd>)ad;
 
/// Tells the delegate that the ad failed to present full screen content.
- (void)ad:(nonnull id<GADFullScreenPresentingAd>)ad
    didFailToPresentFullScreenContentWithError:(nonnull NSError *)error;
 
/// Tells the delegate that the ad will present full screen content.
- (void)adWillPresentFullScreenContent:(nonnull id<GADFullScreenPresentingAd>)ad;
 
/// Tells the delegate that the ad will dismiss full screen content.
- (void)adWillDismissFullScreenContent:(nonnull id<GADFullScreenPresentingAd>)ad;
 
/// Tells the delegate that the ad dismissed full screen content.
- (void)adDidDismissFullScreenContent:(nonnull id<GADFullScreenPresentingAd>)ad;
 
/// Tells the delegate that the user earned a reward.
//- (void)userDidEarnReward:(nonnull NSMutableDictionary*)rewardDic;
 
 
#pragma mark - Unavailable
 
/// Unsupported. Delegates should implement adWillPresentFullScreenContent: instead.
- (void)adDidPresentFullScreenContent:(nonnull id<GADFullScreenPresentingAd>)ad NS_UNAVAILABLE;
 
@end
 
 
@interface WAAdMobProxy : NSObject
 
// 广告测试模式,会强制使用测试广告id
+ (void)setTestMode:(BOOL)isDebugMode;
 
 
 
/**
 * 是否开启横幅广告
 * @return YES表示开启,NO表示关闭
 */
+ (BOOL)isOpenBannerAd;
 
/**
 * 异步检查是否开启横幅广告
 * @param completion 回调 block,返回广告启用状态和可能的错误
 */
+ (void)isOpenBannerAdWithCompletion:(void(^)(BOOL isOpen, NSError *error))completion;
 
 
/**
  横幅广告
  @param viewController 用于显示广告的视图控制器。
  @param containerView 将包含横幅广告的视图。广告视图将作为此视图的子视图添加。
 */
+ (void)bindBannerAdWithViewController:(UIViewController *)viewController containerView:(UIView *)containerView;
 
 
// 插页广告
/**
 * 是否开启插页广告
 * @return YES表示开启,NO表示关闭
 */
+ (BOOL)isOpenInterstitialAd;
 
/**
 * 异步检查是否开启插页广告
 * @param completion 回调 block,返回广告启用状态和可能的错误
 */
+ (void)isOpenInterstitialAdWithCompletion:(void(^)(BOOL isOpen, NSError *error))completion;
 
 
+ (BOOL)checkInterstitialAdReady;
+ (void)showInterstitialAdWithViewController:(UIViewController *)viewController withDelegate:( id<GADFullScreenContentDelegate>)delegate;
 
 
//开屏广告
 
/**
 * 是否开启开屏广告
 * @return YES表示开启,NO表示关闭
 */
+ (BOOL)isOpenAppOpenAd;
 
/**
 * 异步检查是否开启开屏广告
 * @param completion 回调 block,返回广告启用状态和可能的错误
 */
+ (void)isOpenAppOpenAdWithCompletion:(void(^)(BOOL isOpen, NSError *error))completion;
 
+ (BOOL)checkAppOpenAdReady;
+ (void)showAppOpenAdWithViewController:(UIViewController *)viewController withDelegate:( id<GADFullScreenContentDelegate>)delegate;
 
 
 
 
 /**
  * 是否开启激励广告
  * @return YES表示开启,NO表示关闭
  */
+ (BOOL)isOpenRewardedWithAdName:(NSString *)adName;
 
 
/**
 * 异步检查指定名称的激励视频广告是否可用
 * @param adName 广告名称
 * @param completion 回调 block,返回广告可用性状态和可能的错误
 */
+ (void)isOpenRewardedWithAdName:(NSString *)adName
                      completion:(void(^)(BOOL isOpen, NSError *error))completion;
 
 
 /*此方法在给定的视图控制器上显示激励广告,并处理广告的回调。
 
 @param viewController 用于显示广告的视图控制器。
 @param adName 广告名称或广告单元 ID。
 @param extInfo 额外信息,可以用于调试或跟踪广告。
 @param delegate 广告展示和关闭时的回调。
 */
+ (void)showRewardedAdWithViewController:(UIViewController *)viewController adName:(NSString *)adName extInfo:(NSString *)extInfo delegate:( id<GADFullScreenContentDelegate>)delegate;
 
 
 
 
//admob的ump隐私
 
+ (BOOL)checkUmpOptions;
+ (void)showUmpOptionsWithViewController:(UIViewController *)viewController consentGatheringComplete:(void (^)(NSError *_Nullable error))completionHandler;
 
 
 
 
 
 
 
@end
 
NS_ASSUME_NONNULL_END