//
|
// 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
|