一、接入方式

类型
framework

二、公共请求参数

参数 描述 示例值
appid 应用ID 1001
posid 广告位ID 2001
secret 秘钥 ABCD(由平台分配)

三、SDK对接方式

1、下载zip解压缩开后在项目中导入
    mobadvideo.framework 和 mobad.bundle

2、import并加上delegate
    #import <mobadvideo/RewardVideoAd.h>
    @interface ViewController()<MobadDelegate>

3、点击事件时初始化
    [[RewardVideoAd instance].delegate = self;
    [[RewardVideoAd instance] showAd:self appid:2001 posid:3010 secret:@"Ruby"];

4、Build Settings
    Other Linker Flags 记得加上 -ObjC

 

5、增加调用接口代码
    

            - (void)onAdSuccess:(NSString *)msg {
                NSLog(@"onAdSuccess:%@",msg);
            }
            - (void)onAdFailed:(NSString *)msg {
                NSLog(@"onAdFailed:%@",msg);
            }
            - (void)onAdClick:(NSString *)msg {
                NSLog(@"onAdClick:%@",msg);
            }
            - (void)onVideoPlayStart:(NSString *)msg {
                NSLog(@"onVideoPlayStart:%@",msg);
            }
            - (void)onVideoPlayComplete:(NSString *)msg {
                NSLog(@"onVideoPlayComplete:%@",msg);
            }
            - (void)onVideoPlayError:(NSString *)msg {
                NSLog(@"onVideoPlayError:%@",msg);
            }
            - (void)onVideoPlayClose:(NSString *)msg {
                NSLog(@"onVideoPlayClose:%@",msg);
            }
            - (void)onLandingPageOpen:(NSString *)msg {
                NSLog(@"onLandingPageOpen:%@",msg);
            }
            - (void)onLandingPageClose:(NSString *)msg {
                NSLog(@"onLandingPageClose:%@",msg);
            }
            - (void)onReward:(NSDictionary *)info {
                NSLog(@"onReward:%@",info);//有效点击
            }

 

四、回调接口(implements IRewardVideoAdListener)


1、视频获取成功
    onAdSuccess

2、视频获取失败
    onAdFailed

3、点击视频
    onAdClick

4、播放视频开始
    onVideoPlayStart

6、播放视频完成
    onVideoPlayComplete

7、播放视频错误
    onVideoPlayError

8、视频播放被关闭
    onVideoPlayClose

9、视频广告页打开
    onLandingPageOpen

10、视频广告页关闭
    onLandingPageClose

11、视频播放时点击广告(有效)
    onReward