XenonSDK-Export.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. ///Switch Account(切换账号)
  61. -(void)switchAccount;
  62. ///横幅广告(优先级:AdMob >> ironSource)
  63. - (void)adBanner:(NSString*)adId;
  64. ///关闭广告( banner, nativeAd)
  65. - (void)closeBanner:(NSString*)adId;
  66. ///打开原生广告
  67. -(void)openNativeAdTop:(int)top left:(int)left bottom:(int)bottom right:(int)right;
  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. @end