Remarks
:The BUAdSlot object is the ad slot description information that needs to be set when loading the ad, and it needs to be passed in during the initialization phase in BUNativeAd, BUNativeAdsManager, BUBannerAdView, and BUInterstitialAd. Before loading ads, it must be set up
.
Remarks: Please use BUNativeAdsManager to request multiple pieces of advertising data at once
The BUNativeAd class is an interface class for loading advertisements. It can request one advertisement data at a time through the data interface, and can assist UIView to register and process various advertisement click events. After setting the delegate, the data can be obtained. The rootViewController is a mandatory parameter, which pops up the landing page advertisement ViewController.
Field name | Field definition | Field type | Remarks |
ID | Code bit | NSString | Required parameter, code bit ID |
AdType | Ad Type | BUAdSlotAdType | Required parameters; BUAdSlotAdTypeUnknown = 0, BUAdSlotAdTypeBanner = 1, // bannar ad BUDSlotAdTypeInterstitial = 2, // interstitial ad BUDSlotAdTypeSplash = 3, // open screen ad BUAdSlotAdTypeSplash_Cache = 4, // cached Open screen ads BUAdSlotAdTypeFeed = 5, // Information flow ads BUAdSlotAdTypePaster = 6, // paster ads BUAdSlotAdTypeRewardVideo = 7, // Rewarded video ads BUAdSlotAdTypeFullscreenVideo = 8, // Full-screen video ads BUAdSlotAdTypeDrawVideo = 9, // Vertical (immersive) video advertise |
position | Ad position | BUAdSlotPosition | Required parameters; BUAdSlotPositionTop = 1, BUAdSlotPositionBottom = 2, BUAdSlotPositionFeed = 3, BUAdSlotPositionMiddle = 4, // Only for interstitial ads BUAdSlotPositionFullscreen = 5, |
imgSizeArray | A set of image sizes | NSMutableArray<BUSize *> | // Unit px; optional parameters @property (nonatomic, assign) NSInteger width; @property (nonatomic, assign) NSInteger height; |
imgSize | Picture Size | BUSize | // Unit px; Required parameters @property (nonatomic, assign) NSInteger width;@property (nonatomic, assign) NSInteger height; |
iconSize | logo size | BUSize | // unit px; optional parameters @property (nonatomic, assign) NSInteger width; @property (nonatomic, assign) NSInteger height; |
titleLengthLimit | Title maximum length limit | NSInteger | Optional parameter; ad title maximum length limit |
descLengthLimit | Description maximum length limit | NSInteger | Optional parameter; ad description maximum length limit |
isOriginAd | BOOL | Native bannar ads and native interstitial ads are set to 1, other ad types are set to 0, and the default is 0. | |
dictionaryValue | / | NSDictionary | / |
The carrier class of advertisement data is BUMaterialMeta, and all advertisement attributes can be obtained by visiting.
Field name | Field definition | Field type | Remarks |
interactionType | Ad interaction type | BUInteractionType | BUInteractionTypeCustorm = 0,BUInteractionTypeNO_INTERACTION = 1, // Pure advertising display BUInteractionTypeURL = 2, // Use a browser to open the webpage BUInteractionTypePage = 3, // Open the webpage in the app BUInteractionTypeDownload = 4, // Download appBUInteractionTypePhone = 5, // call BUInteractionTypeMessage = 6, // send a message BUInteractionTypeEmail = 7, // send an email BUInteractionTypeVideoAdDetail = 8 // video ad details page |
imageAry | material picture | NSArray<BUImage *> | material picture |
icon | logo logo | BUImage | logo logo |
AdTitle | Ad Title | NSString | Ad Title |
AdDescription | Ad description | NSString | Ad description |
source | Ad source | NSString | Ad source |
buttonText | Text Button | NSString | Text Button |
imageMode | Information flow advertising mode | BUFeedADMode | Only used for information flow advertising, other ads ignore this attributeBUFeedADModeSmallImage = 2, //Small image BUFeedADModeLargeImage = 3, //Large image BUFeedADModeGroupImage = 4, //Group image BUFeedVideoAdModeImage = 5, // Video Ads |
score | star rating | NSInteger | rating standard 1~5 |
commentNum | Number of Comments | NSInteger | Number of Comments |
appSize | Ad installation package size | NSInteger | Ad installation package size, unit byte |
videoDuration | Video duration | NSInteger | Video duration |
mediaExt | Transmission parameters | NSDictionary | Transmission parameters |
Related view categories can add logos, advertising tags, video views, dislike buttons, etc.
Field name | Field definition | Field type | Remarks |
dislikeButton | dislike button | UIButton | You need to actively add views, accept user feedback, and improve the accuracy of advertising. |
adLabel | Ad Label | UILabel | Advertising label, need to be actively added to the view. |
logoImageView | Advertising logo | UIImageView | Advertising logo, need to be actively added to the view. |
logoADImageView | Advertising logo+Advertising logo | UIImageView | Advertising logo+Advertising logo, need to be actively added to the view. |
videoAdView | Video View | BUVideoAdView | Video View must be actively added to the view. |
refreshData:nativeAd | / | / | Refresh data callback method; Note: Add logo, advertising label, video view, dislike button, each time you obtain material information, you need to refresh the call-(void)refreshData:(BUNativeAd * The nativeAd method refreshes the data bound to the corresponding view. |
BUVideoAdView provides play, pause, currentPlayTime and other methods, which can be used by developers in the information flow to realize automatic playback when entering the screen, pause when entering the screen, and click to pass in the elapsed time for replay.
Callback Method | Notes |
- (CGFloat)currentPlayTime; | How to get the playback progress (current time) |
- (void)play; | Play method |
- (void)pause; | Pause method |
@property (nonatomic, weak, readwrite) UIViewController *rootViewController; | Required parameters; set rootViewController, the carrier of advertising jumps, and the root view controller. |
@property (nonatomic, assign) BOOL drawVideoClickEnable; | Whether click to pause the video is allowed, the default is NO. Only used for Draw video ads (immersive ads) |
@property (nonatomic, strong, readwrite, nullable) BUMaterialMeta *materialMeta; | BUMaterialMeta advertising data carrier class, used to get all the attributes of the advertisement |
@property (nonatomic, assign) BOOL supportAutoPlay; | Whether to support auto play, custom mode of video ads, auto play is supported by default |
InitWithMaterial:/playerSeekToTime: | How to restore video progress |
playerPlayIncon: playInconSize: | Custom Pause Button Style Method |
Callback Method | Notes |
videoAdView:didLoadFailWithError:videoAdView | This method is called when the playback fails; the returned error code (error) indicates the reason for the playback failure. Please refer to the link for details of all error codes. Link |
videoAdView: stateDidChanged: | This method is called when the videoAdView playback state changes. playerState: the changed state |
playerDidPlayFinish: | Call this method when playback is complete |
videoAdViewDidClick:videoAdView | Click callback method, click on the video area will trigger this callback method |
videoAdViewFinishViewDidClick: | This method is called when the finish view of videoAdView is clicked |
videoAdViewDidCloseOtherController: interactionType | : This callback is called when the ad jumps to another controller, and the controller is closed. InteractionType: This parameter can be distinguished from the opened appstore/webpage/video ad details page |
The style of the dislike button can be customized through the BUDislike class.
Callback Method | Notes | Other instructions |
@property (nonatomic, copy, readonly) NSArray<BUDislikeWords *> *filterWords; | BUDislikeWords array can display the second page if [filterWords.options count]> 0 | - |
initWithNativeAd: | Initialize with nativeAd to get filterWords and return BUDislike | - |
didSelectedFilterWordWithReason: | 1) This method is called after the user selects the reason for dislike. (Only applicable to objects using'BUDislike.filterWords') 2) If'[filterWords.options count]> 0'. There is no need to call this method. 3)'BUDislike.filterWords' cannot be changed, filterWord must be one of BUDislike, otherwise it will be filtered. | - |
nativeAd: adContainerViewDidRemoved: | Callback for forced closing of information flow ads. Media needs to do the closing related processing here to avoid abnormal page layout |
Note: Use the BUDislike class to ensure that the user clicks to call the interface (didSelectedFilterWordWithReason:) Report the reason
Online Customer Service24/7 Online Customer Service BotManual customer service, weekdays 10~ 12 o'clock/14~ 19 o'clock