1. Set Video Ads Callback
[Yodo1Ads setVideoCallback:^(Yodo1AdsEvent adEvent, NSError *error)
{
NSString* event = @"";
switch (adEvent)
{
case Yodo1AdsEventClose:
event = @"Rewarded video ad has been closed.";
break;
case Yodo1AdsEventShowSuccess:
event = @"Rewarded video ad has been displayed";
break;
case Yodo1AdsEventShowFail:
event = @"Rewarded video ad has been shown failed";
if (error)
{
event = [NSString stringWithFormat:@"%@,error:%@",event,[error localizedDescription]];
}
break;
case Yodo1AdsEventFinish:
event = @"Reward video ad has been played finish, give rewards to the player.";
break;
case Yodo1AdsEventClick:
event = @"Rewarded video ad has been clicked";
break;
default:
break;
}
NSLog(@"video:%@",event);
}];
2. Check Video Loading Status
BOOL isReady = [Yodo1Ads videoIsReady];
3. Show Video Ads
[Yodo1Ads showVideo];
Comments
0 comments
Article is closed for comments.