Card Ad
Add Files for Card Ad Integration
Request Card Ad Instantly
// MyViewController.m
#import "CECardAD.h"
@interface MyViewController()@interface MyViewController() <CECardADDelegate>
@property (nonatomic, strong) CECardAD *cardAd;
@end
- (void) viewDidLoad()
{
CERequestInfo *info = [CERequestInfo new];
info.placement = @"PUT_YOUR_PLACEMENT_STRING_HERE·";
self.cardAd = [[CECardAD alloc] initWithVideoViewProfile: CEVideoViewProfileCardDefaultProfile];
NSError *error;
if ([self.ceCardAD loadAdInstantWithInfo:info error:&error]) {
// TODO: The logic of render ad.
[self appendLog:@"Get instant ad succefully"];
} else {
if (error) {
// TODO: The logic of load ad fail.
NSString * log = [NSString stringWithFormat:@"didFailWithError : %@", error.debugDescription];
[self appendLog:log];
}
}
}Request Card Ad Asynchronously
Add CECardADEventDelegate to get the ad event callback.
CECardADEventDelegate to get the ad event callback.Please refer to CECardAd for more information in detail.
Last updated