123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- //
- // XenonSDK.h
- // XenonSDK
- //
- // Created by SAGESSE on 2019/1/20.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- //#import "XSDataCenter.h"
- #import "TalkingData.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;
- ///自动登录
- - (void)hAutoWithComplete:(void (^)(id user, NSError* error))complete;
- ///check In-app Purchase lost list.
- - (void)checkOrderStatus;
- ///1. TalkingData 游戏运营统计
- - (void)TDGameOperationsinitWithAppID:(NSString *)appid ChannelId:(NSString *)channelId;
- ///
- /// Register a user for data analyzer.
- - (void)TDregisterWithAccount:(NSString*)account name:(NSString*)name;
- /// Login a user for data analyzer.
- - (void)TDloginWithAccount:(NSString*)account name:(NSString*)name;
- //report age and gender.
- -(void)TDreportWithAccount:(NSString*)account Name:(NSString *)name Age:(int)age Gender:(NSInteger)gender;
- /// report account's level and server
- -(void)TDreportWithAccount:(NSString*)account name:(NSString*)name level:(NSInteger)level server:(NSString*)server;
- //TD 充值请求,
- - (void)TDonChargeRequst:(NSString *)orderId
- iapId:(NSString *)iapId
- currencyAmount:(double)currencyAmount
- currencyType:(NSString *)currencyType
- virtualCurrencyAmount:(double)virtualCurrencyAmount
- paymentType:(NSString *)paymentType;
- //TD充值成功,确认玩家支付成功时调用.
- - (void)TDonChargeSuccess:(NSString *)orderId;
- //TD 自定义事件
- -(void)TDonEvent:(NSString *)eventId eventData:(id)parm;
- ///2. TalkingData 应用统计分析
- //Analytics init
- - (void)TDAnalyticsinitWithAppID:(NSString *)appid ChannelId:(NSString *)channelId backgroundSession:(BOOL)flag;
- ///进入页面统计(Begin和End同时调用)
- - (void)TDAnalyticsTrackPageBegin:(NSString *)pageName;
- ///离开页面统计
- - (void)TDAnalyticsTrackPageEnd:(NSString *)pageName;
- //自定义事件1,eventID:自定义事件名称
- - (void)TDAnalyticsTrackEvent:(NSString *)eventID;
- //自定义事件2,eventID:自定义事件名称, event_label:自定义事件Label,用来区分具体场景.
- - (void)TDAnalyticsTrackEvent:(NSString *)eventID label:(NSString *)event_label;
- //自定义事件3,eventID:自定义事件名称, event_label:自定义事件Label,用来区分具体场景. dict:自定义事件的参数及参数取值.
- - (void)TDAnalyticsTrackEvent:(NSString *)eventID label:(NSString *)event_label parameters:(NSDictionary *)dict;
- //应用内支付-创建订单
- -(TalkingDataOrder *)TDAnalyticsCreateOrder:(NSString *)orderId total:(int)total currencyType:(NSString *)currencyType;
- //应用内支付-添加订单详情
- - (TalkingDataOrder *)TDAnalyticsAddItem:(NSString *)itemId category:(NSString *)category name:(NSString *)name unitPrice:(int)unitPrice amount:(int)amount;
- //应用内支付-成功支付订单
- - (void)TDAnalyticsOnPlaceOrder:(NSString *)profileID order:(TalkingDataOrder *)order;
- ///==================3. 穿山甲广告==================/
- ///3.1 初始化
- - (void)CSJAdSDKinit;
- //3.2 打开全屏广告
- -(void)openBUDFullScreenVideoAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //3.3 打开开屏广告
- -(void)openBUDSplashAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //3.4.1 打开新插屏广告(新增)
- -(void)openBUDNewInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //3.4.2 打开旧版插屏广告
- -(void)openBUDInterstitialAd:(NSString *)adName width:(CGFloat)w Height:(CGFloat)h callback:(void (^)(BOOL))callback;
- //3.5 打开视频激励广告
- -(void)openBUDExpressRewardedVideoAd:(NSString *)adName callback:(void (^)(BOOL,BOOL))callback;
- //3.6 打开(模板)Banner广告
- -(void)openBUDNativeBannerAd:(NSString *)adName WithX:(CGFloat)x Y:(CGFloat)y Width:(CGFloat)w Height:(CGFloat)h callback:(void (^)(BOOL))callback;
- //3.7 关闭Banner广告
- -(void)closeBUDBannerAd:(NSString *)adName;
- //3.8 打开原生广告
- -(void)openBUDNativeAd:(NSString *)adName WidthCGRect:(CGRect)rect BUSize:(NSInteger)size callback:(void (^)(BOOL))callback;
- //================4.优量汇广告================/
- //4.1 init
- -(void)YLHAdSDKinit;
- //4.2 打开开屏广告(视频V+)
- -(void)openYLHSplashAd:(NSString *)adName supportZoomoutView:(BOOL)flag callback:(void (^)(BOOL))callback;
- //4.3 打开插屏半屏广告
- -(void)openYLHInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //4.4 打开全屏广告
- -(void)openYLHFullScreenAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //4.5 打开视频激励广告
- -(void)openYLHExpressRewardedVideoAd:(NSString *)adName callback:(void (^)(BOOL,BOOL))callback;
- //4.6 打开横幅广告
- -(void)openYLHExpressBannerAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //4.7 打开原生广告
- -(void)openYLHExpressNativeAdWithPlacementId:(NSString *)placementId AdName:(NSString *)adName Frame:(CGRect)rect callback:(void (^)(BOOL))callback;
- //====================5.TopOn广告====================/
- //init
- - (void)TopOnAdSDKinit;
- //5.1 打开开屏广告
- -(void)openTOPONSplashAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //5.2 打开插屏广告
- -(void)openTOPONInterstitialAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //5.3 打开视频激励广告
- -(void)openTOPONRewardedVideoAd:(NSString *)adName callback:(void (^)(BOOL,BOOL))callback;
- //5.4 打开横幅广告
- -(void)openTOPONExpressBannerAd:(NSString *)adName callback:(void (^)(BOOL))callback;
- //5.5 打开原生广告
- -(void)openTOPONNativeAdWithX:(int)x Y:(int)y width:(int)w height:(int)h adId:(NSString *)adName callback:(void (^)(BOOL))callback;
- //extra
- -(void)showHudWith:(NSString *)name;
- @end
|