// // 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 "FqGameAd.h" #import "GMAdManager.h" #import /// /// 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; ///Switch Account -(void)switchAccount; - (void)GMAdSDKinit; ///横幅广告(Google AdMob) - (void)adBanner:(NSString*)adId; ///横幅广告(IronSource) //- (void)adIronSourceBanner:(NSString*)adId; ///关闭广告( banner横幅, nativeAd原生) - (void)closeAd:(NSString*)adId; ///打开原生广告 -(void)openNativeAdWithCenterX:(int)x Y:(int)y width:(int)w height:(int)h; ///打开视频激励广告 -(void)openVideoAd:(NSString *)adName callback:(void (^)(BOOL))complete; ///打开插页广告 -(void)openInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))complete; ///打开积分墙广告 -(void)openofferWallAd:(NSString *)adName callback:(void (^)(BOOL))complete; //广告是否加载好 -(BOOL)isAvailableAd:(NSString *)adName; /// 生命周期启动入口 /// @param application application对象 //-(void)applicationDidFinishLaunching:(UIApplication *)application; // ///// 游戏进入后台 //-(void)applicationDidEnterBackground; // ///// 游戏进入到前台 //-(void)applicationWillEnterForeground; // ///// 游戏开始活跃运行 //-(void)applicationDidBecomeActive; ///手机震动 -(void)iphoneVibrate; ///跳转appstore评论 -(void)skipToAppsotreWithID:(NSString *)appleId; ///自动登录 - (void)xautoWithComplete:(void (^)(id user, NSError* error))complete; //自动登录2(不带UI界面的) - (void)hAutoWithComplete:(void (^)(id user, NSError* error))complete; ///手动登录 -(void)manualLogin; /// 统计事件1 /// @param eventName 事件名称 -(void)tjEvent:(NSInteger )eventName; /// 统计事件2 /// @param eventName 事件名称 /// @param parameters 事件对应值 -(void)tjEvent:(NSInteger )eventName value:(id)parameters; @end