Interstitial插屏

插屏广告属于全屏广告。一般在关卡过渡,应用开始等节点出现。一般来说插屏广告,用户可选择关闭,并在关闭后返回应用。Vungle插屏的广告素材与奖励广告是相同的。插屏与奖励广告取决于传入参数placement reference id在dashboard上的类型。

请求广告

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


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

播放广告


VungleSDK* sdk = [VungleSDK sharedSDK];
// 静音播放
// sdk.muted = true;
if([sdk isAdCachedForPlacementID:@"YOUR_INTERSTITIAL_PLACEMENT_ID"]){
    NSError* error;
    [sdk playAd:self options:nil placementID:@"YOUR_INTERSTITIAL_PLACEMENT_ID" error:&error];
    if (error) {
        NSLog(@"Error encountered playing ad: %@", error);
    }
}
这篇文章有帮助吗?

Questions?

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