XenonSDK-Export.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. //
  2. // XenonSDK.h
  3. // XenonSDK
  4. //
  5. // Created by SAGESSE on 2019/1/20.
  6. // Copyright © 2019 SAGESSE. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. ///
  10. /// Game SDK
  11. ///
  12. @interface XenonSDK : NSObject
  13. ///
  14. /// A sington instance of SDK.
  15. ///
  16. + (instancetype)sharedSDK;
  17. ///
  18. /// Init the sdk with application code.
  19. /// \param parameter The parameter provided by the platform.
  20. ///
  21. /// \param complete This closure called when init complete.
  22. ///
  23. - (void)initWithParameter:(NSString*)parameter complete:(void (^)(NSError* error))complete;
  24. ///
  25. /// Login the sdk.
  26. /// \param complete This closure called when login complete.
  27. ///
  28. - (void)loginWithComplete:(void (^)(id user, NSError* error))complete;
  29. ///
  30. /// Logout the sdk.
  31. /// \param complete This closure called when logout complete.
  32. ///
  33. - (void)logoutWithComplete:(void (^)(void))complete;
  34. ///
  35. /// Logout the game and sdk.
  36. /// \param handler This closure called when user logout in web view.
  37. /// \note Warning this handler will retain in until next call this method.
  38. ///
  39. - (void)logoutWhenNotification:(void (^)(void))handler;
  40. ///
  41. /// Buy a product.
  42. /// \param parameters Payment request parameters.
  43. /// \param complete Payment result of the callback, if the apple payment is completed before the callback, other payments will be the official launch of the callback
  44. ///
  45. - (void)buy:(NSDictionary*)parameters complete:(void (^)(id order, NSError* error))complete;
  46. ///
  47. /// User Center.
  48. ///
  49. - (void)center;
  50. /// Report role info.
  51. /// \param roleName This role name.
  52. ///
  53. /// \param level This role current level.
  54. ///
  55. /// \param serverId This role current server.
  56. ///
  57. - (void)reportWithRoleName:(NSString*)roleName level:(NSInteger)level serverId:(NSString*)serverId;
  58. ///check In-app Purchase lost list.
  59. - (void)checkOrderStatus;
  60. ///Google AM&ironSource Init
  61. - (void)GMAdSDKinit;
  62. ///横幅广告(优先级:AdMob >> ironSource)
  63. - (void)adBanner:(NSString*)adId;
  64. ///关闭广告( banner横幅, nativeAd原生)
  65. - (void)closeAd:(NSString*)adId;
  66. ///打开原生广告
  67. -(void)openNativeAdWithCenterX:(int)x Y:(int)y width:(int)w height:(int)h;
  68. ///打开视频激励广告
  69. -(void)openVideoAd:(NSString *)adName callback:(void (^)(BOOL))complete;
  70. ///打开积分墙广告
  71. -(void)openofferWallAd:(NSString *)adName callback:(void (^)(BOOL))complete;
  72. ///打开插页广告
  73. -(void)openInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))complete;
  74. //广告是否加载好
  75. -(BOOL)isAvailableAd:(NSString *)adName;
  76. ///手机震动
  77. -(void)iphoneVibrate;
  78. ///跳转appstore评论
  79. -(void)skipToAppsotreWithID:(NSString *)appleId;
  80. ///自动登录
  81. - (void)xautoWithComplete:(void (^)(id user, NSError* error))complete;
  82. ///手动登录
  83. -(void)manualLogin;
  84. /// 统计事件1
  85. /// @param eventName 事件名称
  86. -(void)tjEvent:(NSInteger )eventName;
  87. /// 统计事件2
  88. /// @param eventName 事件名称
  89. /// @param parameters 事件对应值
  90. -(void)tjEvent:(NSInteger )eventName value:(id)parameters;
  91. @end