123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- //
- // XenonSDK.h
- // XenonSDK
- //
- // Created by SAGESSE on 2019/1/20.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- ///
- /// Game SDK
- ///
- @interface XenonSDK : NSObject
- ///
- /// A sington instance of SDK.
- ///
- + (instancetype)sharedSDK;
- ///
- /// Init the sdk with application code.
- /// \param parameter The parameter provided by the platform.
- ///
- /// \param complete This closure called when init complete.
- ///
- - (void)initWithParameter:(NSString*)parameter complete:(void (^)(NSError* error))complete;
- ///
- /// Login the sdk.
- /// \param complete This closure called when login complete.
- ///
- - (void)loginWithComplete:(void (^)(id user, NSError* error))complete;
- ///
- /// Logout the sdk.
- /// \param complete This closure called when logout complete.
- ///
- - (void)logoutWithComplete:(void (^)(void))complete;
- ///
- /// Logout the game and sdk.
- /// \param handler This closure called when user logout in web view.
- /// \note Warning this handler will retain in until next call this method.
- ///
- - (void)logoutWhenNotification:(void (^)(void))handler;
- ///
- /// Buy a product.
- /// \param parameters Payment request parameters.
- /// \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
- ///
- - (void)buy:(NSDictionary*)parameters complete:(void (^)(id order, NSError* error))complete;
- ///
- /// User Center.
- ///
- - (void)center;
- /// Report role info.
- /// \param roleName This role name.
- ///
- /// \param level This role current level.
- ///
- /// \param serverId This role current server.
- ///
- - (void)reportWithRoleName:(NSString*)roleName level:(NSInteger)level serverId:(NSString*)serverId;
- ///check In-app Purchase lost list.
- - (void)checkOrderStatus;
- ///Google AM&ironSource Init
- - (void)GMAdSDKinit;
- ///横幅广告(优先级:AdMob >> ironSource)
- - (void)adBanner:(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)openofferWallAd:(NSString *)adName callback:(void (^)(BOOL))complete;
- ///打开插页广告
- -(void)openInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))complete;
- //广告是否加载好
- -(BOOL)isAvailableAd:(NSString *)adName;
- ///手机震动
- -(void)iphoneVibrate;
- ///跳转appstore评论
- -(void)skipToAppsotreWithID:(NSString *)appleId;
- ///自动登录
- - (void)xautoWithComplete:(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
|