XSCollector.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // XSCollector.h
  3. // XenonSDK
  4. //
  5. // Created by SAGESSE on 2019/5/30.
  6. // Copyright © 2019 SAGESSE. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "TalkingDataGA.h"
  10. #import "TalkingDataAppCpa.h"
  11. @interface XSCollector : NSObject
  12. //单例
  13. + (instancetype)sharedManager;
  14. - (instancetype)initWithAppId:(id)appId gameId:(id)gameId;
  15. @property (nonatomic, class) XSCollector* shared;
  16. @property (nonatomic, readonly) NSString* identifer;
  17. /// Register a user for data analyzer.
  18. - (void)registerWithAccount:(NSString*)account name:(NSString*)name;
  19. /// Login a user for data analyzer.
  20. - (void)loginWithAccount:(NSString*)account name:(NSString*)name;
  21. /// Update account.
  22. - (void)reportWithAccount:(NSString*)account name:(NSString*)name level:(NSInteger)level server:(NSString*)sever;
  23. ///新增接口: Update age and gender(0:未知, 1:男, 2:女)
  24. -(void)reportWithAccount:(NSString *)account name:(NSString *)name age:(int)age gender:(NSInteger)gender;
  25. //充值请求
  26. - (void)onChargeRequst:(NSString *)orderId
  27. iapId:(NSString *)iapId
  28. currencyAmount:(double)currencyAmount
  29. currencyType:(NSString *)currencyType
  30. virtualCurrencyAmount:(double)virtualCurrencyAmount
  31. paymentType:(NSString *)paymentType;
  32. //充值成功,确认玩家支付成功时调用.
  33. - (void)onChargeSuccess:(NSString *)orderId;
  34. //TD 自定义事件
  35. -(void)onEvent:(NSString *)eventId eventData:(id)parm;
  36. @end