liuxue
2021-07-29 7e2df20ccc7cdfb528d309369460a4f3d66afdf1
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
//
//  YYJPlatform.h
//  
//
//  Created by Ferryman on 16/10/9.
//  Copyright © 2016年 YYJia. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "YYJPlatformDefines.h"
 
 
 
@interface YYJPlatform : NSObject
 
/**
 *   @brief 获取YYJPlatform实例
 */
+ (YYJPlatform *)yyj_defaultPlatform;
 
@end
 
#pragma mark    YYJPlatform 初始化配置
@interface YYJPlatform (yyj_Configuration)
/**
 *    @brief  平台初始化方法
 *
 *  @param  appId 游戏在接入联运分配的appId
 *  @param  gameVersion 游戏版本号
 *
 *
 */
- (void)yyj_initializeWithAppId:(NSString *)appId gameVersion:(NSString *)gameVersion appScheme:(NSString *)appScheme;
 
/**
 *  @brief  Facebook初始化方法
 */
- (void)yyj_fb_Init:(UIApplication *)application launchOptions:(NSDictionary *)launchOptions;
 
/**
 * @brief GoogleSign 初始化
 */
- (void)yyj_google_Init:(NSString *)clientId;
 
- (void)yyj_firbase_Init;
/**
 @brief AppsFlyer 初始化
 */
- (void)yyj_AppsFlyer_Init:(NSString *)devkey appleAppID:(NSString *)appId;
 
 
/**
 *  @brief  Facebook OpenUrl方法
 */
- (void)yyj_fb_openURL:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options;
 
/**
 是否开启Log输出
 
 @param isShowLog YES 开启; NO 关闭.  默认关闭
 */
- (void)yyj_isShowLog:(BOOL)isShowLog;
 
/**
 是否禁用注册功能, 禁用后点击注册, 弹出提醒框
 
 @param isForbidRegister YES 开启; NO 关闭.  默认关闭
 */
- (void)yyj_isForbidRegister:(BOOL)isForbidRegister;
 
/**
 显示悬浮框
 */
- (void)yyj_showFloatWindow;
 
/**
 隐藏悬浮框
 */
- (void)yyj_dismissFloatWindow;
 
 
/**
 显示实名认证
*/
- (void)yyj_showRealNameAuthenticationController;
 
@end
#pragma mark-- 用户部分,登录、注销
@interface YYJPlatform (yyj_UserCenter)
 
/**
 *  @brief YYJPlatform 登录界面入口
 *
 */
- (void)yyj_userLogin;
 
 
/**
 *  @brief YYJPlatform 注销, 即退出登录
 *
 */
- (void)yyj_userLogout;
 
/**
 *  @brief 获取本次登录的token,token即sessionid
 */
- (NSString*)yyj_token;
 
/**
 *  @brief 获取登录的UID, 用于标记一个用户
 */
- (NSString*)yyj_userUID;
 
/**
 *  @brief 当前登录用户名
 */
- (NSString *)yyj_loginUserName;
 
 
/**
 *  @brief 当前gameid
 */
- (NSString *)yyj_gameId;
 
 
 
/**
*  @brief 获取实名状态   0:未认证, 1:已认证
*/
- (BOOL)yyj_realNameStatus;
 
/**
*  @brief 当前登录用户的年龄
*/
- (NSString *)yyj_userAge;
 
 
/**
*  @brief 当前登录用户的身份证
*/
- (NSString *)yyj_userRealName;
 
/**
*  @brief 当前登录用户的身份证号码
*/
- (NSString *)yyj_userRealNameID;
 
/**
 *  @brief 当前SDK版本
 */
- (NSString *)yyj_SDKVersion;
 
/**
 *  @brief 登录的类型,登录有值
 */
- (NSString *)yyj_loginType;
 
/**
 *  @brief 注册的类型,新注册值
 */
- (NSString *)yyj_regType;
 
/**
 提交角色信息接口
 提交的时机为: 每次登录 或者每次退出 或者是 角色等级升级的时候 三个时段都调用那是最好的 .  至少满足角色等级升级的时候调用
 
 @param serverid 服务器编号
 @param serverName 服务器名称
 @param charid 角色ID
 @param rolename 角色名称
 @param rolelevel 角色等级 (必填)
 */
- (void)yyj_submitRoleInfoWithServerid:(NSString *)serverid andServerName:(NSString *)serverName andCharid:(NSString *)charid andRoleName:(NSString *)rolename andRolelevel:(NSString *)rolelevel;
@end
 
#pragma mark 充值、 支付
@interface YYJPlatform (yyj_BMai)
 
/**
 *  @brief 充值, 该接口首先获取支付渠道,然后支付并进入web支付页面
 *
 *  @param rmb          充值金额 单位元
 *  @param productID    iTunes 苹果后台配置的内购物品的产品ID
 *  @param name         商品名
 *  @param charid       角色ID
 *  @param serverid     服务器ID
 *  @param info         扩展信息
 *  @param cporderid    游戏商订单ID
 *
 */
- (void)yyj_BMaiWithMoney:(NSString *)rmb productID:(NSString *)productID productName:(NSString *)name charId:(NSString *)charid serverId:(NSString *)serverid expandInfo:(NSString *)info cporderId:(NSString *)cporderid;
 
 
/**
 *  @brief 充值, 该接口通过角色等级, 金额等条件选择支付方式
 
 *  @param level        角色等级
 *  @param rmb          充值金额 单位元
 *  @param productID    iTunes 苹果后台配置的内购物品的产品ID
 *  @param name         商品名
 *  @param charid       角色ID
 *  @param serverid     服务器ID
 *  @param info         扩展信息
 *  @param cporderid    游戏商订单ID
 */
- (void)yyj_BMaiWithRoleLevel:(NSString *)level money:(NSString *)rmb productID:(NSString *)productID productName:(NSString *)name charId:(NSString *)charid serverId:(NSString *)serverid expandInfo:(NSString *)info cporderId:(NSString *)cporderid;
 
 
 
@end
 
 
 
 
#pragma mark 充值、 支付
@interface YYJPlatform (yyj_AppFlys)
//Facebook
-(void)yyj_facebookTraceEvent:(NSString *)eventName param:(NSDictionary *)param;
 
/**
 for AppsFly
 */
-(void)yyj_AppFlysTraceEvent:(NSString *)eventName param:(NSDictionary *)param;
 
 
- (void)yyj_applicationDidBecomeActive:(UIApplication *)application;
- (BOOL)yyj_application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *) options;
- (BOOL)yyj_application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation;
- (BOOL)yyj_application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler;
// Report Push Notification attribution data for re-engagements
- (void)yyj_application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
 
 
 
@end