MREC

SDK 6.4以上才支持MREC广告。MREC采用移动广告行业的标准样式,长宽为300dp × 250dp。

请求广告

SDK发送广告请求,在服务器给填充后开始缓存视频广告素材

NSError* error;
VungleSDK* sdk = [VungleSDK sharedSDK];
[sdk loadPlacementWithID:"YOUR_MREC_PLACEMENT_ID" error:&error];

播放广告


@interface ViewController ()
@property (nonatomic) UIView *mrecContainer;
@end

...
NSError *error;
NSDictionary *options = @{};
VungleSDK* sdk = [VungleSDK sharedSDK];
If (![sdk addAdViewToView:_mrecContainer withOptions:options placementID:"YOUR_MREC_PLACEMENT_ID" error:&error]) {
    if (error) 
    {
        NSLog(@"Error encountered while playing an ad: %@", error);
    }
}

关闭广告

VungleSDK* sdk = [VungleSDK sharedSDK];
[sdk finishedDisplayingAd];
Powered by Creativity Driven by Performance Sign Up Here

Questions?

Need further assistance, feel free to reach out to us, we’re here to help!

这篇文章有帮助吗?