1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- //
- // XenonSDK.h
- // XenonSDK
- //
- // Created by SAGESSE on 2019/1/20.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "XSUtils.h"
- #import "XSTracker.h"
- #import "XSCollector.h"
- #import "XSNetwork.h"
- #import "XSUser.h"
- #import "XSConfiguration.h"
- #import "XSDataCenter.h"
- #import <AudioToolbox/AudioToolbox.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;
- ///Switch Account
- -(void)switchAccount;
- //掉单校验
- - (void)checkOrderStatus;
- //提示弹窗
- -(void)showHudSuccess:(NSString*)str;
- @end
|