// // XenonSDK.h // XenonSDK // // Created by SAGESSE on 2019/1/20. // Copyright © 2019 SAGESSE. All rights reserved. // #import #import "XSUtils.h" #import "XSTracker.h" #import "XSCollector.h" #import "XSNetwork.h" #import "XSUser.h" #import "XSConfiguration.h" #import "XSDataCenter.h" #import "GMAdManager.h" /// /// Game SDK /// @interface XenonSDK : NSObject @property (nonatomic, strong) XSUser* user; @property (nonatomic, strong) XSConfiguration* configuration; @property (nonatomic, strong) void(^sdk_loginCallback)(id user); @property (nonatomic, strong) void(^sdk_logoutCallback)(id user); @property (nonatomic, strong) UIView* bubbleView; @property (nonatomic, strong) UIViewController* rootViewController; @property (nonatomic, strong) NSString* appId; @property (nonatomic, strong) NSString* channelId; @property (nonatomic, strong) NSString* adId; @property (nonatomic, strong) NSString* adFlag; @property (nonatomic, readonly) NSBundle* bundle; @property (nonatomic, readonly) NSString* version; @property (nonatomic, readonly) NSString* shortVersion; @property (nonatomic, readonly) NSString* model; @property (nonatomic, readonly) NSString* advertisingIdentifier; @property (nonatomic, readonly) NSString* advertisingVendor; @property (nonatomic, strong) NSString* token; /// A sington instance of SDK. + (instancetype)sharedSDK; /// Init the sdk with application code. - (void)initWithParameter:(NSString*)parameter complete:(void (^)(NSError* error))complete; /// Login the sdk. - (void)loginWithComplete:(void (^)(id user, NSError* error))complete; /// Logout the sdk. - (void)logoutWithComplete:(void (^)(void))complete; /// Logout the game and sdk. - (void)logoutWhenNotification:(void (^)(void))handler; /// Buy a product. - (void)buy:(NSDictionary*)parameters complete:(void (^)(id order, NSError* error))complete; /// User Center. - (void)center; /// Report role info. - (void)reportWithRoleName:(NSString*)roleName level:(NSInteger)level serverId:(NSString*)serverId; ///check In-app Purchase lost list. - (void)checkOrderStatus; ///Switch Account(切换账号) -(void)switchAccount; ///横幅广告(优先级:AdMob >> ironSource) - (void)adBanner:(NSString*)adId; ///关闭广告( banner, nativeAd) - (void)closeBanner:(NSString*)adId; ///打开原生广告 -(void)openNativeAdTop:(int)top left:(int)left bottom:(int)bottom right:(int)right; ///打开视频激励广告 -(void)openVideoAd:(NSString *)adName callback:(void (^)(BOOL))complete; ///打开积分墙广告 -(void)openofferWallAd:(NSString *)adName callback:(void (^)(BOOL))complete; ///打开插页广告 -(void)openInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))complete; //广告是否加载好 -(BOOL)isAvailableAd:(NSString *)adName; @end