123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //
- // 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 "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
|