From b7bda4d0a8627c927bf411b28b86ec18e0218425 Mon Sep 17 00:00:00 2001 From: allez <305670599@qq.com> Date: 星期一, 04 十二月 2023 22:00:30 +0800 Subject: [PATCH] 0312 没有初始化监听,直接返回初始化成功 --- Channel/IOS/mlgtgame/Plugins/The2thWorldSDK/UniversalSDK.mm | 99 +++---------------------------------------------- 1 files changed, 7 insertions(+), 92 deletions(-) diff --git a/Channel/IOS/mlgtgame/Plugins/The2thWorldSDK/UniversalSDK.mm b/Channel/IOS/mlgtgame/Plugins/The2thWorldSDK/UniversalSDK.mm index 382737a..12afe60 100644 --- a/Channel/IOS/mlgtgame/Plugins/The2thWorldSDK/UniversalSDK.mm +++ b/Channel/IOS/mlgtgame/Plugins/The2thWorldSDK/UniversalSDK.mm @@ -197,100 +197,15 @@ } -(void)QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [MYSDK application:application didFinishLaunchingWithOptions:launchOptions]; + NSLog(@"鍒濆鍖栨垚鍔�"); - + NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:S2U_SdkInitComplete], @"code", + @"mlgtgame", @"channelPlatform", nil]; + [self SendMessageToUnity:_dict]; + } - -// -//- (void)smpcQpLoginResult:(NSNotification *)notify { -// NSLog(@"鐧诲綍鎴愬姛閫氱煡%@",notify); -// int error = [[[notify userInfo] objectForKey:kSmpcQuickSDKKeyError] intValue]; -// NSDictionary *userInfo = [notify userInfo]; -// if (error == 0) { -// NSString *uid = [[SMPCQuickSDK defaultInstance] userId]; -// channel = [[SMPCQuickSDK defaultInstance] getConfigValue:@"channel"]; -// if(channel&&[channel length]!=0) -// { -// -// } -// else -// { -// channel = [NSString stringWithFormat:@"%d", [SMPCQuickSDK defaultInstance].channelType]; -// } -// NSString *gameUID = [NSString stringWithFormat:@"%@@%@", uid, channel]; -// NSString *UserName = [[SMPCQuickSDK defaultInstance] userId]; -// //鑾峰彇user_token锛岀敤浜庝粠鏈嶅姟鍣ㄥ幓楠岃瘉鐢ㄦ埛淇℃伅 -// NSString *user_token = userInfo[kSmpcQuickSDKKeyUserToken]; -// -// NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: -// [NSDictionary dictionaryWithObjectsAndKeys:user_token, @"token", -// UserName, @"userName", -// gameUID, @"account", nil],@"info", -// [NSNumber numberWithInt:S2U_FreePlatformLoginOk], @"code", nil]; -// [self SendMessageToUnity:_dict]; -// } -//} -// -//- (void)smpcQpLogoutResult:(NSNotification *)notify { -// NSLog(@"%s",__func__); -// NSDictionary *userInfo = notify.userInfo; -// int errorCode = [userInfo[kSmpcQuickSDKKeyError] intValue]; -// switch (errorCode) { -// case SMPC_QUICK_SDK_ERROR_NONE: -// { -// NSLog(@"娉ㄩ攢鎴愬姛"); -// //娉ㄩ攢鎴愬姛 -// NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil]; -// [self SendMessageToUnity:_dict]; -// } -// break; -// case SMPC_QUICK_SDK_ERROR_LOGOUT_FAIL: -// default: -// { -// //娉ㄩ攢澶辫触 -// NSLog(@"娉ㄩ攢澶辫触"); -// } -// break; -// } -// if (errorCode == SMPC_QUICK_SDK_ERROR_NONE) { -// -// } -// -//} - -//- (void)smpcQpRechargeResult:(NSNotification *)notify{ -// NSLog(@"鍏呭�肩粨鏋�%@",notify); -// NSDictionary *userInfo = notify.userInfo; -// int error = [[userInfo objectForKey:kSmpcQuickSDKKeyError] intValue]; -// switch (error) { -// case SMPC_QUICK_SDK_ERROR_NONE: -// { -// //鍏呭�兼垚鍔� -// //QuickSDK璁㈠崟鍙�,cp涓嬪崟鏃朵紶鍏ョ殑璁㈠崟鍙凤紝娓犻亾sdk鐨勮鍗曞彿锛宑p涓嬪崟鏃朵紶鍏ョ殑鎵╁睍鍙傛暟 -// NSString *orderID = userInfo[kSmpcQuickSDKKeyOrderId]; -// NSString *cpOrderID = userInfo[kSmpcQuickSDKKeyCpOrderId]; -// NSLog(@"鍏呭�兼垚鍔熸暟鎹細%@,%@",orderID,cpOrderID); -// NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: -// [NSNumber numberWithInt:S2U_FreePlatformPayOk], @"code", nil]; -// [self SendMessageToUnity:_dict]; -// } -// break; -// case SMPC_QUICK_SDK_ERROR_RECHARGE_CANCELLED: -// case SMPC_QUICK_SDK_ERROR_RECHARGE_FAILED: -// { -// //鍏呭�煎け璐� -// NSString *orderID = userInfo[kSmpcQuickSDKKeyOrderId]; -// NSString *cpOrderID = userInfo[kSmpcQuickSDKKeyCpOrderId]; -// NSLog(@"鍏呭�煎け璐ユ暟鎹�%@,%@",orderID,cpOrderID); -// NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys: -// [NSNumber numberWithInt:S2U_FreePlatformPayFail], @"code", nil]; -// [self SendMessageToUnity:_dict]; -// } -// break; -// default: -// break; -// } -//} -(id) APNativeJSONObject:(NSData *)data{ if (!data) { -- Gitblit v1.8.0