ZAAManager.h 1.7 KB
//
//  ZAAManager.h
//  ZAnti-Addiction
//
//  Created by ws on 2022/12/5.
//
//
//  Public

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


@protocol ZAAManagerDelegate <NSObject>

/// SDK已完成处理,可以开始游戏
/// Allow the game to start
- (void)ZAASDKCompleted;


/// 支付前检查,收到此方法代表可以支付
/// Receipt of this callback indicates that payment can be made
- (void)ZAASDKCheckPaySuccess;


@end

@interface ZAAManager : NSObject

@property (nonatomic, weak) id<ZAAManagerDelegate> delegate;

+ (instancetype) sharedSDK;
+ (NSString*)version;

/// 本次已游玩时间,每1分钟会进行信息上报,上报成功后清零
/// Play time after this start
/// Report once every 1 minute,If the report is successful, the value is reset to 0
- (int)getPassTime;

/// 实名认证状态 0:未验证;1:验证通过;2:正在验证;3:认证失败
/// Get the status of user authencation
/// 0: No verified
/// 1: Has been verified
/// 2: Being verified
/// 3: Verified failure
- (int)getUserAuthenticationStatus;

/// 实名认证结果 1:成年;2:未成年
/// Check user is adult 1: adult ;2: nonage
- (int)getUserAgeGroup;

/// 剩余游戏时间(s)
/// remaining time for minors (s)
- (int)checkLeftTimeOfCurrentUser;


/// 游戏付费前调用,检查是否可以付费
/// amount 支付金额
/// check before making in-app purchases
/// @param amount pay amount
- (void)checkPayWithAmount:(NSString*)amount;


/// 游戏付费成功之后调用,告知服务端
/// amount 支付金额
/// Game payment after successful call, synchronization to the server
/// @param amount pay amount
- (void)recordPayWithAmount:(NSString*)amount;

@end

NS_ASSUME_NONNULL_END