ZAAManager.h
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// 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