#import "LYWSDKDispatcher.h"
@implementation LYWSDKDispatcher
static LYWSDKDispatcher *dispatcher;
+(LYWSDKDispatcher*) init
{
if(dispatcher == nil)
{
dispatcher = [[LYWSDKDispatcher alloc] init];
}
return dispatcher;
}
-(void)lywSDKInit:(NSMutableDictionary *) dic
{
NSMutableDictionary *callBackDic = [[NSMutableDictionary alloc] init];
[callBackDic setValue:@E_LYWSDKInit forKey:@"type"];
[callBackDic setValue:@E_LYWSDKSuccess forKey:@"code"];
[callBackDic setValue:@"ios initialize success" forKey:@"message"];
LYWSDKProtocolIOS::getInstance()->receiveCallBack(LYWSDKProtocolIOS::getInstance()->dictionary2jParam(callBackDic));
}
-(void)login:(NSMutableDictionary *) dic
{
NSMutableDictionary *callBackDic = [NSMutableDictionary dictionary];
[callBackDic setValue:@E_LYWSDKLogin forKey:@"type"];
[callBackDic setValue:@E_LYWSDKSuccess forKey:@"code"];
[callBackDic setValue:@"login success" forKey:@"message"];
LYWSDKProtocolIOS::getInstance()->receiveCallBack(LYWSDKProtocolIOS::getInstance()->dictionary2jParam(callBackDic));
}
-(void)pay:(NSMutableDictionary *) dic
{
NSMutableDictionary *callBackDic = [NSMutableDictionary dictionary];
[callBackDic setValue:@E_LYWSDKPay forKey:@"type"];
[callBackDic setValue:@E_LYWSDKSuccess forKey:@"code"];
[callBackDic setValue:@"pay success" forKey:@"message"];
LYWSDKProtocolIOS::getInstance()->receiveCallBack(LYWSDKProtocolIOS::getInstance()->dictionary2jParam(callBackDic));
}
-(void)loop:(NSMutableDictionary *) dic
{
}
@end
@implementation LYWSDKDispatcher
static LYWSDKDispatcher *dispatcher;
+(LYWSDKDispatcher*) init
{
if(dispatcher == nil)
{
dispatcher = [[LYWSDKDispatcher alloc] init];
}
return dispatcher;
}
-(void)lywSDKInit:(NSMutableDictionary *) dic
{
NSMutableDictionary *callBackDic = [[NSMutableDictionary alloc] init];
[callBackDic setValue:@E_LYWSDKInit forKey:@"type"];
[callBackDic setValue:@E_LYWSDKSuccess forKey:@"code"];
[callBackDic setValue:@"ios initialize success" forKey:@"message"];
LYWSDKProtocolIOS::getInstance()->receiveCallBack(LYWSDKProtocolIOS::getInstance()->dictionary2jParam(callBackDic));
}
-(void)login:(NSMutableDictionary *) dic
{
NSMutableDictionary *callBackDic = [NSMutableDictionary dictionary];
[callBackDic setValue:@E_LYWSDKLogin forKey:@"type"];
[callBackDic setValue:@E_LYWSDKSuccess forKey:@"code"];
[callBackDic setValue:@"login success" forKey:@"message"];
LYWSDKProtocolIOS::getInstance()->receiveCallBack(LYWSDKProtocolIOS::getInstance()->dictionary2jParam(callBackDic));
}
-(void)pay:(NSMutableDictionary *) dic
{
NSMutableDictionary *callBackDic = [NSMutableDictionary dictionary];
[callBackDic setValue:@E_LYWSDKPay forKey:@"type"];
[callBackDic setValue:@E_LYWSDKSuccess forKey:@"code"];
[callBackDic setValue:@"pay success" forKey:@"message"];
LYWSDKProtocolIOS::getInstance()->receiveCallBack(LYWSDKProtocolIOS::getInstance()->dictionary2jParam(callBackDic));
}
-(void)loop:(NSMutableDictionary *) dic
{
}
@end
本文介绍了 LYWSDKDispatcher 类的实现细节,包括初始化方法、初始化 SDK、登录及支付等功能的回调处理。通过 Objective-C 代码展示了如何设置回调字典并调用相应的协议方法。
1069

被折叠的 条评论
为什么被折叠?



