GMSDK.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // GMSDK.h
  3. // TestFramework
  4. //
  5. // Created by Mgs on 2020/11/11.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <UIKit/UIKit.h>
  9. #import "GMAdManager.h"
  10. #import "GMBannerManager.h"
  11. #import "GMIntersManager.h"
  12. #import "GMNativeManager.h"
  13. #import "GMSplashManager.h"
  14. #import "GMRewardVideoManager.h"
  15. NS_ASSUME_NONNULL_BEGIN
  16. static UIApplication * mApplication;
  17. @interface GMSDK : NSObject
  18. /// 生命周期启动入口
  19. /// @param application application对象
  20. +(void)applicationDidFinishLaunching:(UIApplication *)application;
  21. /// 游戏进入后台
  22. +(void)applicationDidEnterBackground;
  23. /// 游戏进入到前台
  24. +(void)applicationWillEnterForeground;
  25. /// 游戏开始活跃运行
  26. +(void)applicationDidBecomeActive;
  27. /// 获取某一个广告位广告是否可用
  28. /// @param adName 广告位名称
  29. +(BOOL)isAdReady:(NSString *)adName;
  30. /// 打开一个广告
  31. /// @param adName 广告位名称
  32. +(void)openAd:(NSString *)adName;
  33. /// 打开一个广告 带着播放结果回调
  34. +(void)openAd:(NSString *)adName callback:(void(^)(BOOL))callback;
  35. /// 打开一个原生广告
  36. /// @param adName 打开广告名称
  37. /// @param top 离屏幕上边的距离
  38. /// @param left 离屏幕左边的距离
  39. /// @param bottom 离屏幕下边的距离
  40. /// @param right 离屏幕右边的距离
  41. +(void)openNativeAd:(NSString *)adName Top:(NSString *)top left:(NSString *)left bottom:(NSString *)bottom right:(NSString *)right;
  42. /// 关闭广告
  43. /// @param adName 广告位名称
  44. +(void)closeAd:(NSString *)adName;
  45. /// 统计事件1
  46. /// @param eventName 事件名称
  47. +(void)tjEvent:(NSString *)eventName;
  48. /// 统计事件2
  49. /// @param eventName 事件名称
  50. /// @param value 事件对应值
  51. +(void)tjEvent:(NSString *)eventName value:(NSString *)value;
  52. /// 打开更多游戏
  53. +(void)openMoreGame;
  54. /// 打开用户评价
  55. +(void)openAppraise;
  56. /// 打开分享
  57. +(void)shareApp;
  58. /// 获取苹果ID
  59. +(NSString *)getAppleId;
  60. /// 获取项目ID
  61. +(NSString *)getProjectId;
  62. /// 获取Application
  63. +(UIApplication *)getApplication;
  64. @end
  65. NS_ASSUME_NONNULL_END