admin
2022-09-04 fa05f89529e05078b29606e4beda3de5cfdce485
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
//
//  BUNativeAdsManager.h
//  BUAdSDK
//
//  Copyright © 2017 bytedance. All rights reserved.
//
 
/**
 BUNativeAdsManager : for multiple requests at the same time.
 */
 
#import "BUInterfaceBaseObject.h"
#import "BUAdSlot.h"
#import "BUMaterialMeta.h"
#import "BUNativeAd.h"
#import "BUNativeExpressAdViewDelegate.h"
 
@protocol BUNativeAdsManagerDelegate;
 
NS_ASSUME_NONNULL_BEGIN
/// Bunativeadsmanager class can request multiple ad data per time.
 __attribute__((objc_subclassing_restricted))
@interface BUNativeAdsManager : BUInterfaceBaseObject <BUMopubAdMarkUpDelegate>
 
@property (nonatomic, strong, nullable) BUAdSlot *adslot;
@property (nonatomic, strong, nullable) NSArray<BUNativeAd *> *data;
/// The delegate for receiving state change messages such as requests succeeding/failing.
/// The delegate can be set to any object which conforming to <BUNativeAdsManagerDelegate>.
@property (nonatomic, weak, nullable) id<BUNativeAdsManagerDelegate> delegate;
/// The delegate for receiving messages when is render template
@property (nonatomic, weak, nullable) id<BUNativeExpressAdViewDelegate> nativeExpressAdViewDelegate;
/// Valid only in native Feed
@property (nonatomic, assign, readwrite) CGSize adSize;
- (instancetype)initWithSlot:(BUAdSlot * _Nullable) slot;
 
/**
 It is recommended to request no more than 3 ads.
 The maximum is 10.
 */
- (void)loadAdDataWithCount:(NSInteger)count;
 
@end
 
@protocol BUNativeAdsManagerDelegate <NSObject>
 
@optional
 
- (void)nativeAdsManagerSuccessToLoad:(BUNativeAdsManager *)adsManager nativeAds:(NSArray<BUNativeAd *> *_Nullable)nativeAdDataArray;
 
- (void)nativeAdsManager:(BUNativeAdsManager *)adsManager didFailWithError:(NSError *_Nullable)error;
 
@end
 
NS_ASSUME_NONNULL_END