AdBase.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // AdBase.h
  3. // XenonSDK
  4. //
  5. // Created by fq on 2020/12/23.
  6. // Copyright © 2020 SAGESSE. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "AppDelegate.h"
  11. @interface AdBase : NSObject
  12. @property (nonatomic, assign)NSInteger weight;
  13. //视频激励广告回调函数
  14. @property (nonatomic, strong) void(^rewardCallback)(int);
  15. //平台名称
  16. @property (nonatomic,strong)NSString *agentName;
  17. //中介
  18. @property (nonatomic,strong)NSString *medium;
  19. //原平台单元id
  20. @property (nonatomic,strong)NSString *adUnitId;
  21. //广告类型 Rewarded
  22. @property (nonatomic,strong)NSString *type;
  23. //广告组ID Rewarded
  24. @property (nonatomic,strong)NSString *unitAdId;
  25. //CP传递过来的广告位
  26. @property (nonatomic,strong)NSString *adId;
  27. //广告平台返回的报错信息内容
  28. @property (nonatomic,strong)NSString *errorMsg;
  29. -(BOOL)isReady;
  30. //播放横幅广告
  31. - (void)play:(NSString*)adId callback:(void(^)(int intValue))back;
  32. //获取当前的window
  33. -(UIWindow*)currentWindow;
  34. //获取当前的vc
  35. -(UIViewController *)currentViewController;
  36. @end