From eca06f96b1b75c79ebce9c38baf90a15d5a616e1 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 16 四月 2024 10:27:03 +0800
Subject: [PATCH] 0312 越南ios 新sdk

---
 /dev/null                                                        |  479 -----------------------------
 Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjRES.bundle/anniu.png |    0 
 Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.h                |   84 +++++
 Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.mm               |  378 +++++++++++++++++++++++
 4 files changed, 462 insertions(+), 479 deletions(-)

diff --git a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png b/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png
deleted file mode 100644
index 7ac8e4d..0000000
--- a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/The2thWorldRES.bundle/TY_AN_34.png
+++ /dev/null
Binary files differ
diff --git a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist b/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist
deleted file mode 100644
index e8511cd..0000000
--- a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/The2thWorldRES.bundle/The2thWorldSDKConfig.plist
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>JPush_AppKey</key>
-	<string>111a5f817592ddc68edc802c</string>
-	<key>TTTrack_AppID</key>
-	<string>155761</string>
-	<key>TrackingIO_AppKey</key>
-	<string>12aef4c284c6996703765fe9f7422428</string>
-</dict>
-</plist>
diff --git a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/UniversalSDK.h b/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/UniversalSDK.h
deleted file mode 100644
index 5962c19..0000000
--- a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/UniversalSDK.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-//  UniversalSDK.h
-//  Unity-iPhone
-//
-//
-
-#ifndef __UNIVERSALSDK_H_
-#define __UNIVERSALSDK_H_
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-#import <WebKit/WebKit.h>
-#import <MHVNFramework/MoHuanSDK.h>
-
-#define UNITY_OBJ_NAME "SDKUtility"
-#define UNITY_FUNC_NAME "HandleSdkMessage"
-
-
-#define S2U_BatteryLevel                1
-#define S2U_BatteryCharging             2	
-#define S2U_SdkInitComplete             3
-#define S2U_DeviceInfo                  4
-#define S2U_PushClientID                5
-#define S2U_FreePlatformInitOk          100
-#define S2U_FreePlatformInitFail        101
-#define S2U_FreePlatformLoginOk         102
-#define S2U_FreePlatformLoginFail       103
-#define S2U_FreePlatformLoginCancel     104
-#define S2U_FreePlatformLogoutOk        105
-#define S2U_FreePlatformLogoutFail      106
-#define S2U_FreePlatformSwitchAccountOk 107
-#define S2U_FreePlatformPayOk           108
-#define S2U_FreePlatformPayFail         109
-#define S2U_FreePlatformPayCancel       110
-#define S2U_FreePlatformRegisterOk      111
-#define S2U_FBShareResult               112  //fb鍒嗕韩缁撴灉
-
-#define U2S_BatteryListenStart          1
-#define U2S_BatteryListenStop           2
-#define U2S_CopyContent                 7
-#define U2S_OpenWebView                 8
-#define U2S_Init                        9
-#define U2S_FreePlatformInit            100
-#define U2S_FreePlatformLogin           101
-#define U2S_FreePlatformLogout          102
-#define U2S_FreePlatformSwitchAccount   103
-#define U2S_FreePlatformPay             104
-#define U2S_PayFinished                 105
-#define U2S_CreateRole                  106
-#define U2S_RoleLogin                   107
-#define U2S_RoleLevelUp                 108
-#define U2S_ShareToFaceBook             112 //FB鍒嗕韩
-#define U2S_GotoPingfen                  113 //鍓嶅線璇勫垎
-#define U2S_FansHouse                   120 //绮変笣灞�
-#define U2S_GotoShop                    121 //鎵撳紑鍟嗗簵
-#define U2S_TrackEvent                  122 //鑷畾涔変簨浠�
-#define U2S_JPushAddLocalMessage        200
-#define U2S_JPushRemoveLocalMessage     201
-#define U2S_MakeKeyAndVisible           300
-#define U2S_SendRegistEvent             500
-#define U2S_SendLoginEvent              600
-
-#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
-
-static BOOL     JPush_IsProduction = FALSE;
-
-@interface UniversalSDK : NSObject<WKUIDelegate, WKNavigationDelegate> {
-    WKWebView* m_wkWebView;
-    WKWebView* m_jiaWKWebView;
-    UIButton* m_CloseBtn;
-}
-
--(void) HandleUnityMessage:(NSString*) json;
--(void) Init;
--(id) APNativeJSONObject:(NSData*) data;
-
--(void) QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
-
-@end
-
-@interface UniversalSDK ()<MoHuanSDKDelegate>
-//@property (weak, nonatomic) IBOutlet UILabel *demoTitleLabel;
-//@property(nonatomic)UIInterfaceOrientationMask korientationMask;
-//@property (weak, nonatomic) IBOutlet UILabel *resultLabel;
-//@property (nonatomic, strong)MoHuanSDK *sdkManager;
-//@property (weak, nonatomic) IBOutlet UIImageView *backImageView;
-
-@end
-
-#endif
diff --git a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/UniversalSDK.mm b/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/UniversalSDK.mm
deleted file mode 100644
index 2755ffb..0000000
--- a/Channel/IOS/hyyngame/Plugins/The2thWorldSDK/UniversalSDK.mm
+++ /dev/null
@@ -1,479 +0,0 @@
-//
-//  UniversalSDK.m
-//  Unity-iPhone
-//
-//  Created by 钄$�� on 2018/4/24.
-//
-
-#import "UniversalSDK.h"
-#import "AdSupport/AdSupport.h"
-#import "opus.h"
-#ifdef NSFoundationVersionNumber_iOS_9_x_Max
-#import <UserNotifications/UserNotifications.h>
-#endif
-#import "SystemConfiguration/CaptiveNetwork.h"
-
-@implementation UniversalSDK
-
-#define CHANNEL_NUM 1
-
-static int s_frequency = 16000;
-static int s_bitRate = 20000;
-static int s_bandMode = OPUS_BANDWIDTH_WIDEBAND;
-static int s_frameSize = 160;
-static int sBatteryLevel = -1;
-static int sBatteryState = -1;
-static NSString* sAppID;
-static NSString* sGameID;
-static NSString* sUserName;
-static NSThread* _thread;
-
-
-
-
-
--(id)init
-{
-     self = [super init];
-    
-     m_jiaWKWebView = [[WKWebView alloc] initWithFrame:CGRectZero];
-     NSURL *url = [NSURL URLWithString:@"www.baidu.com"];
-     NSURLRequest *request = [NSURLRequest requestWithURL:url
-                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
-                                           timeoutInterval:10.f];
-     [m_jiaWKWebView loadRequest:request];
-
-     return self;
-}
-
--(void) Init
-{
-    UIDevice *_device = [UIDevice currentDevice];
-    _device.batteryMonitoringEnabled = true;
-    
-    NSString* _uniqueID = [[NSUserDefaults standardUserDefaults] objectForKey:@"tsw_unique_id"];
-    //鑾峰彇IDFA
-    NSString* _idfa = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
-    
-    if(_uniqueID == NULL || [_uniqueID length] <= 0)
-    {
-        //鍒ゆ柇IDFA鏄惁涓虹┖
-        BOOL isEmpty = [[_idfa stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@"0" withString:@""].length;
-        if (isEmpty) {
-            //涓嶄负绌猴紝灏咺DFA浣滀负鍞竴鏍囪瘑
-            _uniqueID = _idfa;
-        }
-        else {
-            //涓虹┖锛岃幏鍙朥UID浣滀负鍞竴鏍囪瘑
-            _uniqueID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
-        }
-        
-        //淇濆瓨鍞竴璁惧鏍囪瘑,濡傚凡瀛樺湪鍒欎笉杩涜浠讳綍澶勭悊
-        [[NSUserDefaults standardUserDefaults] setObject:_uniqueID forKey:@"tsw_unique_id"];
-        [[NSUserDefaults standardUserDefaults] synchronize];
-    }
-    
-    // 鍙栧緱UserAgent
-    [m_jiaWKWebView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id _Nullable userAgent, NSError * _Nullable error) {
-
-        NSLog(@"%@", userAgent);
-        NSString* _userAgent = [NSString stringWithFormat:@"%@", userAgent];
-        // 鍙戦�佽澶囦俊鎭�
-        NSMutableDictionary *_dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-                                      _uniqueID,@"unique_id",
-                                      _idfa,@"android_id",
-                                      [NSNumber numberWithInt:S2U_DeviceInfo],@"code",
-                                      _userAgent,@"userAgent",nil];
-        [self SendMessageToUnity:_dict];
-        }];
-    
-    
-    [MoHuanSDK sharedGameSDK] .sdkDelegate = (id<MoHuanSDKDelegate>)self;
-    UIViewController *view = UnityGetGLViewController();
-    [[MoHuanSDK sharedGameSDK] initSDKwithViewController:view gameId:1135 appId:36 channelId:332];
-}
-
-
-- (void)smpcQpLogoutResult:(NSNotification *)notify {
-    NSLog(@"sdk璇锋眰閫�鍑�");
-    //娉ㄩ攢鎴愬姛
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil];
-    [self SendMessageToUnity:_dict];
-    
-}
-
--(void)SendMessageToUnity:(NSDictionary*)dict
-{
-    BOOL _result = [NSJSONSerialization isValidJSONObject:dict];
-    if(_result)
-    {
-        NSData* _jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:NULL];
-        UnitySendMessage(UNITY_OBJ_NAME, UNITY_FUNC_NAME,
-                         [[[NSString alloc] initWithData:_jsonData encoding:NSUTF8StringEncoding] UTF8String]);
-    }
-}
-
--(void) BatteryThread {
-    while (TRUE)
-    {
-        [NSThread sleepForTimeInterval:1];
-        
-        UIDevice *_device = [UIDevice currentDevice];
-        
-        int _state = [_device batteryState];
-        if(_state != sBatteryState){
-            sBatteryState = _state;
-            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                                   [NSNumber numberWithInt:sBatteryState], @"status",
-                                   [NSNumber numberWithInt:S2U_BatteryCharging], @"code", nil];
-            
-            [self SendMessageToUnity:_dict];
-        }
-        
-        int _level = (int)([_device batteryLevel] * 100);
-        if(_level != sBatteryLevel){
-            sBatteryLevel = _level;
-            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                                   [NSNumber numberWithInt:sBatteryLevel], @"level",
-                                   [NSNumber numberWithInt:S2U_BatteryLevel], @"code", nil];
-            
-            [self SendMessageToUnity:_dict];
-        }
-    }
-}
-
--(void) OpenURL:(NSString*) url {
-    
-    if(m_jiaWKWebView != NULL) {
-        [self btnClick:NULL];
-        return;
-    }
-    
-    CGRect _bounds = UnityGetMainWindow().bounds;
-    
-    float _scale = _bounds.size.width / 1334;
-    
-    float _width = 982 * _scale;
-    float _height = 560 * _scale;
-    
-    float _offsetX = (_bounds.size.width - _width) * .5f;
-    float _offsetY = (_bounds.size.height - _height) * .5f;
-    
-    m_jiaWKWebView = [[WKWebView alloc] initWithFrame:CGRectMake(_offsetX, _offsetY, _width, _height)];
-    m_jiaWKWebView.UIDelegate = self;
-    m_jiaWKWebView.navigationDelegate = self ;
-    m_jiaWKWebView.scrollView.scrollEnabled = YES;
-    m_jiaWKWebView.scrollView.bounces = NO;
-    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:url]];
-    [m_jiaWKWebView loadRequest:request];
-    
-    
-}
-
--(void) btnClick:(UIButton*)sender {
-    [m_CloseBtn removeFromSuperview];
-    [m_CloseBtn removeTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
-    m_CloseBtn = NULL;
-    
-    NSURLCache *_cache = [NSURLCache sharedURLCache];
-    [_cache removeAllCachedResponses];
-    [_cache setDiskCapacity:0];
-    [_cache setMemoryCapacity:0];
-    
-    [m_jiaWKWebView removeFromSuperview];
-    m_jiaWKWebView = NULL;
-}
-
-
-//-(void)webViewDidFinishLoad:(WKWebView *)webView{
-- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{
-    
-    CGRect _bounds = UnityGetMainWindow().bounds;
-    
-    float _scale = _bounds.size.width / 1334;
-    
-    float _width = 982 * _scale;
-    float _height = 560 * _scale;
-    
-    m_CloseBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
-    [m_CloseBtn setFrame:CGRectMake(_width - 600 * _scale, _height - 86 * _scale, 360 * _scale, 72 * _scale)];
-    [m_CloseBtn setTitle:@"OK" forState:UIControlStateNormal];
-    
-    NSString *_bundlePath = [[NSBundle mainBundle] pathForResource:@"The2thWorldRES.bundle" ofType:nil];
-    NSBundle *_bundle = [NSBundle bundleWithPath:_bundlePath];
-    NSString *pic1Path = [_bundle pathForResource:@"TY_AN_34.png" ofType:nil];
-    
-    [m_CloseBtn setBackgroundImage:[UIImage imageWithContentsOfFile:pic1Path] forState:UIControlStateNormal];
-    [m_CloseBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-    [m_CloseBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
-    
-    [m_jiaWKWebView addSubview:m_CloseBtn];
-    
-    UIView *view = UnityGetGLViewController().view;
-    [view addSubview:m_jiaWKWebView];
-}
-
--(void)QuickSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-    NSLog(@"鍒濆鍖栨垚鍔�");
-    
-    [[MoHuanSDK sharedGameSDK] application:application
-                  didFinishLaunchingWithOptions:launchOptions];
-    
-}
-
-
-#pragma mark - 鍥炶皟缁撴灉
-- (void)onInitSuccess
-{
-    NSLog(@"\n***************鍒濆鍖栨垚鍔�****************");
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:S2U_FreePlatformInitOk], @"code", nil];
-    [self SendMessageToUnity:_dict];
-	
-	NSMutableDictionary *_dict1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-                                  [NSNumber numberWithInt:S2U_SdkInitComplete], @"code",
-                                  @"hyyn", @"channelPlatform", nil];
-    [self SendMessageToUnity:_dict1];
-}
-- (void)onInitFail:(NSError *)kerror
-{
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:S2U_FreePlatformInitFail], @"code", nil];
-    [self SendMessageToUnity:_dict];
-}
-
-
-- (void)onLoginSuccess:(id )user
-{
-
-    NSString *uid = user[@"user_id"];
-    NSString *gameUID = [NSString stringWithFormat:@"%@@1", uid];
-
-    NSLog(@" 鐧婚檰鍙傛暟锛氥��%@ %@ %@銆�", uid, user[@"timestamp"], user[@"sign"]);
-    
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                           [NSDictionary dictionaryWithObjectsAndKeys:user[@"sign"], @"token",
-                            uid, @"userName",
-                            user[@"timestamp"], @"token_expire",
-                            gameUID, @"account", nil],@"info",
-                           [NSNumber numberWithInt:S2U_FreePlatformLoginOk], @"code", nil];
-    [self SendMessageToUnity:_dict];
-}
-
-- (void)onLoginFail:(NSError *)kerror
-{
-    //self.resultLabel.text = [NSString stringWithFormat:@"鐧诲綍澶辫触\nerror:%@",kerror.localizedDescription];
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                           [NSNumber numberWithInt:S2U_FreePlatformLoginFail], @"code", nil];
-    [self SendMessageToUnity:_dict];
-}
-
-- (void)onLogout
-{
-    NSLog(@"娉ㄩ攢");
-    //self.resultLabel.text = @"娉ㄩ攢鎴愬姛";
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                           [NSNumber numberWithInt:S2U_FreePlatformLogoutOk], @"code", nil];
-    [self SendMessageToUnity:_dict];
-}
-- (void)onPaySuccess{
-    NSLog(@"鍏呭�艰皟鐢ㄨ繑鍥�");
-    NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                           [NSNumber numberWithInt:S2U_FreePlatformPayOk], @"code", nil];
-    [self SendMessageToUnity:_dict];
-}
-
-
--(id) APNativeJSONObject:(NSData *)data{
-    if (!data) {
-        return nil;
-    }
-    
-    NSError *error = nil;
-    id retId = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
-    
-    if (error) {
-        NSLog(@"%s trans data to obj with error: %@", __func__, error);
-        return nil;
-    }
-    
-    return retId;
-}
-
--(void)HandleUnityMessage:(NSString *)json {
-    
-    NSLog(@"鏀跺埌Unity鍙戞潵鐨勬秷鎭� => %@", json);
-    
-    NSData *_jsonData = [json dataUsingEncoding:NSUTF8StringEncoding];
-    NSDictionary *_dict = [self APNativeJSONObject:_jsonData];
-    
-    switch([[_dict objectForKey:@"code"] intValue]){
-        case U2S_Init:
-            sAppID = _dict[@"appID"];
-            sGameID = _dict[@"gameID"];
-            [self Init];
-
-            break;
-        case U2S_CopyContent:
-            [UIPasteboard generalPasteboard].string = _dict[@"content"];
-            break;
-        case U2S_FreePlatformInit:
-            break;
-        case U2S_MakeKeyAndVisible:
-        {
-            UIWindow * _window = [[UIApplication sharedApplication].delegate window];
-            if (_window != nil && _window.rootViewController != nil) {
-                [_window makeKeyAndVisible];
-            }
-        }
-            break;
-        case U2S_OpenWebView:
-            [self OpenURL:_dict[@"url"]];
-            break;
-        case U2S_FreePlatformLogin:
-        {
-            [[MoHuanSDK sharedGameSDK] login];
-        }
-            break;
-        case U2S_FreePlatformLogout:
-        {
-            [[MoHuanSDK sharedGameSDK] logout];
-        }
-            break;
-        case U2S_CreateRole:
-        {
-            [[MoHuanSDK sharedGameSDK] roleCreateWithRoleId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]] serverName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]] serverId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]] userMoney:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]] vipLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]]];
-            break;
-        }
-        case U2S_RoleLogin:
-        {
-            // 鏇存柊瑙掕壊淇℃伅
-            [[MoHuanSDK sharedGameSDK] roleLoginWithRoleId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]] serverName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]] serverId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]] userMoney:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]] vipLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]]];
-            break;
-        }
-            
-        case U2S_RoleLevelUp:
-        {
-            // 鏇存柊瑙掕壊淇℃伅
-            [[MoHuanSDK sharedGameSDK] roleLevelUpWithRoleId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]] serverName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]] serverId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]] userMoney:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"money"]] vipLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"vipLevel"]]];
-            break;
-        }
-        case U2S_FreePlatformPay:
-        {
-
-            NSString *extra = [NSString stringWithFormat:@"1_%@_%@_%@", [NSString stringWithFormat:@"%@", [_dict objectForKey:@"orderId"]],
-                               [NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]],
-                               [NSString stringWithFormat:@"%@", [_dict objectForKey:@"cpInfo"]]];
-            
-            [[MoHuanSDK sharedGameSDK] IAPWithProductId:[NSString stringWithFormat:@"%@", [_dict objectForKey:@"storeOrderInfo"]] productDesc:[NSString stringWithFormat:@"%@", [_dict objectForKey:@"title"]] amount:[NSString stringWithFormat:@"%@", [_dict objectForKey:@"mount"]] cpOrderId:[NSString stringWithFormat:@"%@", [_dict objectForKey:@"orderId"]] callBackUrl:@"Pxrv%3A%3EW%3B%26A%26qGEf%5D1%3B4Pip6Lrvc%5BChojgYPV%2A%3B%3Bm%7BBDbK%28kX%3Bm%60Ey40%2CO%609HKz%26T0%268" callBackInfo:extra roleId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"level"]] serverId:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"sid"]] serverName:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"serverName"]]];
-            
-            break;
-        }
-        case U2S_BatteryListenStart:
-            if(_thread == NULL)
-            {
-                _thread = [[NSThread alloc] initWithTarget:self selector:@selector(BatteryThread) object:nil];
-                [_thread setName:@"BatteryCheck"];
-            }
-            if(![_thread isExecuting])
-            {
-                [_thread start];
-            }
-            break;
-        case U2S_BatteryListenStop:
-            break;
-        case U2S_ShareToFaceBook:
-        {
-            [[MoHuanSDK sharedGameSDK] shareUrlWithResult:^(BOOL isSuccess) {
-                NSLog(@"%@%@",@"facebookShareURL ",isSuccess?@"YES":@"NO");
-            }];
-            
-            NSDictionary *_dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                                   [NSDictionary dictionaryWithObjectsAndKeys:@"1", @"state", nil],@"info",
-                                   [NSNumber numberWithInt:S2U_FBShareResult], @"code", nil];
-            [self SendMessageToUnity:_dict];
-            break;
-        }
-
-        case U2S_GotoPingfen:
-            [[MoHuanSDK sharedGameSDK] appStoreReview];
-            break;
-        case U2S_FansHouse:
-            [[MoHuanSDK sharedGameSDK] facebookFansHome];
-            break;
-        case U2S_GotoShop:
-            [[MoHuanSDK sharedGameSDK] appStore];
-            break;
-        case U2S_TrackEvent:
-            //isRepeat:NO浠呬笂鎶ヤ竴娆★紝YES鍏佽閲嶅涓婃姤锛堜竴鑸湅杩愯惀瑕佹眰锛�
-            [[MoHuanSDK sharedGameSDK] reportTrackEvent:[NSString stringWithFormat:@"%@",[_dict objectForKey:@"eventName"]] isRepeat:[[_dict objectForKey:@"eventName"] boolValue]];
-            break;
-    }
-}
-@end
-
-extern "C" void native_opus_init(int frequency, int bitRate, int bandMode)
-{
-    s_frequency = frequency;
-    s_bandMode = bandMode;
-    s_bitRate = bitRate;
-    s_frameSize = frequency / 100;
-}
-
-extern "C" int native_opus_encode(opus_int16 *pcm, int len, unsigned char *opus)
-{
-    int errorCode = 0;
-    opus_int32 skip = 0;
-    OpusEncoder *enc = opus_encoder_create(s_frequency, CHANNEL_NUM, OPUS_APPLICATION_VOIP, &errorCode);
-    if (OPUS_OK != errorCode) {
-        enc = NULL;
-        return -1;
-    }
-    
-    opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(s_bandMode));
-    opus_encoder_ctl(enc, OPUS_SET_BITRATE(s_bitRate));
-    opus_encoder_ctl(enc, OPUS_SET_VBR(1));
-    opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10));
-    opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(0));
-    opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(OPUS_SIGNAL_VOICE));
-    opus_encoder_ctl(enc, OPUS_SET_DTX(0));
-    opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(0));
-    opus_encoder_ctl(enc, OPUS_GET_LOOKAHEAD(&skip));
-    opus_encoder_ctl(enc, OPUS_SET_LSB_DEPTH(16));
-    
-    unsigned char *rbytes = opus;
-    opus_int16 *frame = pcm;
-    int totalSize = 0;
-    while (len >= s_frameSize)
-    {
-        opus_int32 length = opus_encode(enc, frame, s_frameSize, rbytes + sizeof(char), s_bitRate);
-        rbytes[0] = length;
-        frame += s_frameSize;
-        rbytes += length + sizeof(char);
-        len -= s_frameSize;
-        totalSize += (length+1);
-    }
-    opus_encoder_destroy(enc);
-    return totalSize;
-}
-
-extern "C" int native_opus_decode(unsigned char *opus, int len, short *pcm)
-{
-    int err = 0;
-    //opus_int32 skip = 0;
-    
-    OpusDecoder *dec = opus_decoder_create(s_frequency, CHANNEL_NUM, &err);
-    if (err != OPUS_OK) {
-        dec = NULL;
-        return -1;
-    }
-    
-    while (len > 0)
-    {
-        int frame_opus_length = opus[0];
-        int length = opus_decode(dec, opus + sizeof(char), frame_opus_length, pcm, s_frameSize, 0);
-        opus += sizeof(char) + frame_opus_length;
-        pcm += s_frameSize;
-        len = len - frame_opus_length - sizeof(char);
-    }
-    opus_decoder_destroy(dec);
-    return 0;
-}
diff --git a/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjRES.bundle/anniu.png b/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjRES.bundle/anniu.png
new file mode 100644
index 0000000..dcebca0
--- /dev/null
+++ b/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjRES.bundle/anniu.png
Binary files differ
diff --git a/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.h b/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.h
new file mode 100644
index 0000000..bf951cf
--- /dev/null
+++ b/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.h
@@ -0,0 +1,84 @@
+#ifndef __YNMBXXJSDK_H_
+#define __YNMBXXJSDK_H_
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+#import <WebKit/WebKit.h>
+#import <MHVNFramework/TUYESDK.h>
+
+#define FUNC_NAME_GAME "ynmbxxjUtil"
+#define FUNCTION_NAME "HandleMsgWithSDK"
+
+
+#define STOUni_BatteryLevel                1
+#define STOUni_BatteryCharging             2	
+#define STOUni_SdkInitComplete             3
+#define STOUni_DeviceInfo                  4
+#define STOUni_PushClientID                5
+#define STOUni_YNmbxxjInitOk          100
+#define STOUni_YNmbxxjInitFail        101
+#define STOUni_YNmbxxjLoginOk         102
+#define STOUni_YNmbxxjLoginFail       103
+#define STOUni_YNmbxxjLoginCancel     104
+#define STOUni_YNmbxxjLogoutOk        105
+#define STOUni_YNmbxxjLogoutFail      106
+#define STOUni_YNmbxxjSwitchAccountOk 107
+#define STOUni_YNmbxxjPayOk           108
+#define STOUni_YNmbxxjPayFail         109
+#define STOUni_YNmbxxjPayCancel       110
+#define STOUni_YNmbxxjRegisterOk      111
+#define STOUni_FBShareResult               112  //fb鍒嗕韩缁撴灉
+
+#define UTOSDK_BatteryListenStart          1
+#define UTOSDK_BatteryListenStop           2
+#define UTOSDK_CopyContent                 7
+#define UTOSDK_OpenWebView                 8
+#define UTOSDK_Init                        9
+#define UTOSDK_YNmbxxjInit            100
+#define UTOSDK_YNmbxxjLogin           101
+#define UTOSDK_YNmbxxjLogout          102
+#define UTOSDK_YNmbxxjSwitchAccount   103
+#define UTOSDK_YNmbxxjPay             104
+#define UTOSDK_PayFinished                 105
+#define UTOSDK_CreateRole                  106
+#define UTOSDK_RoleLogin                   107
+#define UTOSDK_RoleLevelUp                 108
+#define UTOSDK_ShareToFaceBook             112 //FB鍒嗕韩
+#define UTOSDK_GotoPingfen                  113 //鍓嶅線璇勫垎
+#define UTOSDK_FansHouse                   120 //绮変笣灞�
+#define UTOSDK_GotoShop                    121 //鎵撳紑鍟嗗簵
+#define UTOSDK_TrackEvent                  122 //鑷畾涔変簨浠�
+#define UTOSDK_JPushAddLocalMessage        200
+#define UTOSDK_JPushRemoveLocalMessage     201
+#define UTOSDK_MakeKeyAndVisible           300
+#define UTOSDK_SendRegistEvent             500
+#define UTOSDK_SendLoginEvent              600
+
+#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
+
+
+
+@interface YnmbxxjSDK : NSObject<WKUIDelegate, WKNavigationDelegate> {
+    WKWebView* m_wkWebView;
+    WKWebView* m_jiaWKWebView;
+    UIButton* c_loseBtn;
+}
+
+-(void) HandleGameMessage:(NSString*) json;
+-(void) Init;
+-(id) APNativeJSONObject:(NSData*) data;
+
+-(void) YngameSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
+
+@end
+
+@interface YnmbxxjSDK ()<DelegateTUYESDK>
+//@property (weak, nonatomic) IBOutlet UILabel *demoTitleLabel;
+//@property(nonatomic)UIInterfaceOrientationMask korientationMask;
+//@property (weak, nonatomic) IBOutlet UILabel *resultLabel;
+//@property (nonatomic, strong)TUYESDK *sdkManager;
+//@property (weak, nonatomic) IBOutlet UIImageView *backImageView;
+
+@end
+
+#endif
diff --git a/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.mm b/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.mm
new file mode 100644
index 0000000..fca21a7
--- /dev/null
+++ b/Channel/IOS/hyyngame/Plugins/ynmbxxj/YnmbxxjSDK.mm
@@ -0,0 +1,378 @@
+#import "YnmbxxjSDK.h"
+#ifdef NSFoundationVersionNumber_iOS_9_x_Max
+#import <UserNotifications/UserNotifications.h>
+#endif
+#import "SystemConfiguration/CaptiveNetwork.h"
+
+@implementation YnmbxxjSDK
+
+static int cClassBattery = -1;
+static int cZhuangtaiBattery = -1;
+static NSString* cYingyongID;
+static NSString* cYouxiID;
+static NSString* sYonghuMing;
+static NSThread* _xianchengThd;
+
+
+
+-(id)init
+{
+     self = [super init];
+    
+     m_jiaWKWebView = [[WKWebView alloc] initWithFrame:CGRectZero];
+     NSURL *dizhi = [NSURL URLWithString:@"www.google.com"];
+     NSURLRequest *request = [NSURLRequest requestWithURL:dizhi
+                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
+                                           timeoutInterval:8.f];
+     [m_jiaWKWebView loadRequest:request];
+
+     return self;
+}
+
+-(void) Init
+{
+    UIDevice *_device = [UIDevice currentDevice];
+    _device.batteryMonitoringEnabled = true;
+    
+    NSString* _uniqueID = @"ddgg";
+    //鑾峰彇IDFA
+    NSString* _idfa = @"acd";
+    
+    // 鍙栧緱UserAgent
+    [m_jiaWKWebView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id _Nullable userAgent, NSError * _Nullable error) {
+
+        NSLog(@"%@", userAgent);
+        NSString* _userAgent = [NSString stringWithFormat:@"%@", userAgent];
+        // 鍙戦�佽澶囦俊鎭�
+        NSMutableDictionary *d_i_ct = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+                                      _uniqueID,@"unique_id",
+                                      _idfa,@"android_id",
+                                      [NSNumber numberWithInt:STOUni_DeviceInfo],@"code",
+                                      _userAgent,@"userAgent",nil];
+        [self SendMessageToUnity:d_i_ct];
+        }];
+    
+    
+    [TUYESDK sharedGameSDK] .sdkDelegate = (id<TUYESDKDelegate>)self;
+    UIViewController *view = UnityGetGLViewController();
+    [[TUYESDK sharedGameSDK] initSDKwithViewController:view gameId:1135 appId:36 channelId:332];
+}
+
+
+- (void)smpcQpLogoutResult:(NSNotification *)notify {
+    NSLog(@"sdk璇锋眰閫�鍑�");
+    //娉ㄩ攢鎴愬姛
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:STOUni_YNmbxxjLogoutOk], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+    
+}
+
+-(void)SendMessageToUnity:(NSDictionary*)dict
+{
+    BOOL _result = [NSJSONSerialization isValidJSONObject:dict];
+    if(_result)
+    {
+        NSData* _jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:NULL];
+        UnitySendMessage(FUNC_NAME_GAME, FUNCTION_NAME,
+                         [[[NSString alloc] initWithData:_jsonData encoding:NSUTF8StringEncoding] UTF8String]);
+    }
+}
+
+-(void) BatteryThread {
+    while (TRUE)
+    {
+        [NSThread sleepForTimeInterval:1];
+        
+        UIDevice *_device = [UIDevice currentDevice];
+        
+        int _state = [_device batteryState];
+        if(_state != cZhuangtaiBattery){
+            cZhuangtaiBattery = _state;
+            NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                                   [NSNumber numberWithInt:cZhuangtaiBattery], @"status",
+                                   [NSNumber numberWithInt:STOUni_BatteryCharging], @"code", nil];
+            
+            [self SendMessageToUnity:d_i_ct];
+        }
+        
+        int _level = (int)([_device batteryLevel] * 100);
+        if(_level != cClassBattery){
+            cClassBattery = _level;
+            NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                                   [NSNumber numberWithInt:cClassBattery], @"level",
+                                   [NSNumber numberWithInt:STOUni_BatteryLevel], @"code", nil];
+            
+            [self SendMessageToUnity:d_i_ct];
+        }
+    }
+}
+
+-(void) OpenURL:(NSString*) url {
+    
+    if(m_jiaWKWebView != NULL) {
+        [self btnClick:NULL];
+        return;
+    }
+    
+    CGRect b_ounds = UnityGetMainWindow().bounds;
+    
+    float s_cale = b_ounds.size.width / (1300 + 34);
+    
+    float w_idth = (900 + 82) * s_cale;
+    float h_eight = (500 + 60) * s_cale;
+    
+    float _offsetX = (b_ounds.size.width - w_idth) * .5f;
+    float _offsetY = (b_ounds.size.height - h_eight) * .5f;
+    
+    m_jiaWKWebView = [[WKWebView alloc] initWithFrame:CGRectMake(_offsetX, _offsetY, w_idth, h_eight)];
+    m_jiaWKWebView.UIDelegate = self;
+    m_jiaWKWebView.navigationDelegate = self ;
+    m_jiaWKWebView.scrollView.scrollEnabled = YES;
+    m_jiaWKWebView.scrollView.bounces = NO;
+    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:url]];
+    [m_jiaWKWebView loadRequest:request];
+    
+    
+}
+
+-(void) btnClick:(UIButton*)sender {
+    [c_loseBtn removeFromSuperview];
+    [c_loseBtn removeTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
+    c_loseBtn = NULL;
+    
+    NSURLCache *_cache = [NSURLCache sharedURLCache];
+    [_cache removeAllCachedResponses];
+    [_cache setDiskCapacity:0];
+    [_cache setMemoryCapacity:0];
+    
+    [m_jiaWKWebView removeFromSuperview];
+    m_jiaWKWebView = NULL;
+}
+
+
+//-(void)webViewDidFinishLoad:(WKWebView *)webView{
+- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{
+    
+    CGRect _bounds = UnityGetMainWindow().bounds;
+    
+    float _scale = _bounds.size.width / 1334;
+    
+    float _width = 982 * _scale;
+    float _height = 560 * _scale;
+    
+    c_loseBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
+    [c_loseBtn setFrame:CGRectMake(_width - 600 * _scale, _height - 86 * _scale, 360 * _scale, 72 * _scale)];
+    [c_loseBtn setTitle:@"OK" forState:UIControlStateNormal];
+    
+    NSString *_bundlePath = [[NSBundle mainBundle] pathForResource:@"YnmbxxjRES.bundle" ofType:nil];
+    NSBundle *_bundle = [NSBundle bundleWithPath:_bundlePath];
+    NSString *pic1Path = [_bundle pathForResource:@"anniu.png" ofType:nil];
+    
+    [c_loseBtn setBackgroundImage:[UIImage imageWithContentsOfFile:pic1Path] forState:UIControlStateNormal];
+    [c_loseBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
+    [c_loseBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
+    
+    [m_jiaWKWebView addSubview:c_loseBtn];
+    
+    UIView *view = UnityGetGLViewController().view;
+    [view addSubview:m_jiaWKWebView];
+}
+
+-(void)YngameSDKInit:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+    NSLog(@"鍒濆鍖栨垚鍔�");
+    
+    [[TUYESDK sharedGameSDK] application:application
+                  didFinishLaunchingWithOptions:launchOptions];
+    
+}
+
+
+#pragma mark - 鍥炶皟缁撴灉
+- (void)onInitSuccess
+{
+    NSLog(@"\n***************鍒濆鍖栨垚鍔�****************");
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:STOUni_YNmbxxjInitOk], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+	
+	NSMutableDictionary *d_i_ct1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+                                  [NSNumber numberWithInt:STOUni_SdkInitComplete], @"code",
+                                  @"hyyn", @"channelPlatform", nil];
+    [self SendMessageToUnity:d_i_ct1];
+}
+- (void)onInitFail:(NSError *)kerror
+{
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:STOUni_YNmbxxjInitFail], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+}
+
+
+- (void)onLoginSuccess:(id )user
+{
+
+    NSString *uid = user[@"user_id"];
+    NSString *gameUID = [NSString stringWithFormat:@"%@@1", uid];
+
+    NSLog(@" 鐧婚檰鍙傛暟锛氥��%@ %@ %@銆�", uid, user[@"timestamp"], user[@"sign"]);
+    
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                           [NSDictionary dictionaryWithObjectsAndKeys:user[@"sign"], @"token",
+                            uid, @"userName",
+                            user[@"timestamp"], @"token_expire",
+                            gameUID, @"account", nil],@"info",
+                           [NSNumber numberWithInt:STOUni_YNmbxxjLoginOk], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+}
+
+- (void)onLoginFail:(NSError *)kerror
+{
+    //self.resultLabel.text = [NSString stringWithFormat:@"鐧诲綍澶辫触\nerror:%@",kerror.localizedDescription];
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                           [NSNumber numberWithInt:STOUni_YNmbxxjLoginFail], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+}
+
+- (void)onLogout
+{
+    NSLog(@"娉ㄩ攢");
+    //self.resultLabel.text = @"娉ㄩ攢鎴愬姛";
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                           [NSNumber numberWithInt:STOUni_YNmbxxjLogoutOk], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+}
+- (void)onPaySuccess{
+    NSLog(@"鍏呭�艰皟鐢ㄨ繑鍥�");
+    NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                           [NSNumber numberWithInt:STOUni_YNmbxxjPayOk], @"code", nil];
+    [self SendMessageToUnity:d_i_ct];
+}
+
+
+-(id) APNativeJSONObject:(NSData *)data{
+    if (!data) {
+        return nil;
+    }
+    
+    NSError *error = nil;
+    id retId = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
+    
+    if (error) {
+        NSLog(@"%s trans data to obj with error: %@", __func__, error);
+        return nil;
+    }
+    
+    return retId;
+}
+
+-(void)HandleGameMessage:(NSString *)json {
+    
+    NSLog(@"鏀跺埌Unity鍙戞潵鐨勬秷鎭� => %@", json);
+    
+    NSData *_jsonData = [json dataUsingEncoding:NSUTF8StringEncoding];
+    NSDictionary *d_i_ct = [self APNativeJSONObject:_jsonData];
+    
+    switch([[d_i_ct objectForKey:@"code"] intValue]){
+        case UTOSDK_Init:
+            cYingyongID = d_i_ct[@"appID"];
+            cYouxiID = d_i_ct[@"gameID"];
+            [self Init];
+
+            break;
+        case UTOSDK_CopyContent:
+            [UIPasteboard generalPasteboard].string = d_i_ct[@"content"];
+            break;
+        case UTOSDK_YNmbxxjInit:
+            break;
+        case UTOSDK_MakeKeyAndVisible:
+        {
+            UIWindow * _window = [[UIApplication sharedApplication].delegate window];
+            if (_window != nil && _window.rootViewController != nil) {
+                [_window makeKeyAndVisible];
+            }
+        }
+            break;
+        case UTOSDK_OpenWebView:
+            [self OpenURL:d_i_ct[@"url"]];
+            break;
+        case UTOSDK_YNmbxxjLogin:
+        {
+            [[TUYESDK sharedGameSDK] login];
+        }
+            break;
+        case UTOSDK_YNmbxxjLogout:
+        {
+            [[TUYESDK sharedGameSDK] logout];
+        }
+            break;
+        case UTOSDK_CreateRole:
+        {
+            [[TUYESDK sharedGameSDK] roleCreateWithRoleId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"level"]] serverName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"serverName"]] serverId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"sid"]] userMoney:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"money"]] vipLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"vipLevel"]]];
+            break;
+        }
+        case UTOSDK_RoleLogin:
+        {
+            // 鏇存柊瑙掕壊淇℃伅
+            [[TUYESDK sharedGameSDK] roleLoginWithRoleId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"level"]] serverName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"serverName"]] serverId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"sid"]] userMoney:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"money"]] vipLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"vipLevel"]]];
+            break;
+        }
+            
+        case UTOSDK_RoleLevelUp:
+        {
+            // 鏇存柊瑙掕壊淇℃伅
+            [[TUYESDK sharedGameSDK] roleLevelUpWithRoleId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"level"]] serverName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"serverName"]] serverId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"sid"]] userMoney:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"money"]] vipLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"vipLevel"]]];
+            break;
+        }
+        case UTOSDK_YNmbxxjPay:
+        {
+
+            NSString *extra = [NSString stringWithFormat:@"1_%@_%@_%@", [NSString stringWithFormat:@"%@", [d_i_ct objectForKey:@"orderId"]],
+                               [NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"sid"]],
+                               [NSString stringWithFormat:@"%@", [d_i_ct objectForKey:@"cpInfo"]]];
+            
+            [[TUYESDK sharedGameSDK] IAPWithProductId:[NSString stringWithFormat:@"%@", [d_i_ct objectForKey:@"storeOrderInfo"]] productDesc:[NSString stringWithFormat:@"%@", [d_i_ct objectForKey:@"title"]] amount:[NSString stringWithFormat:@"%@", [d_i_ct objectForKey:@"mount"]] cpOrderId:[NSString stringWithFormat:@"%@", [d_i_ct objectForKey:@"orderId"]] callBackUrl:@"Pxrv%3A%3EW%3B%26A%26qGEf%5D1%3B4Pip6Lrvc%5BChojgYPV%2A%3B%3Bm%7BBDbK%28kX%3Bm%60Ey40%2CO%609HKz%26T0%268" callBackInfo:extra roleId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleID"]] roleName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"roleName"]] roleLevel:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"level"]] serverId:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"sid"]] serverName:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"serverName"]]];
+            
+            break;
+        }
+        case UTOSDK_BatteryListenStart:
+            if(_xianchengThd == NULL)
+            {
+                _xianchengThd = [[NSThread alloc] initWithTarget:self selector:@selector(BatteryThread) object:nil];
+                [_xianchengThd setName:@"BatteryCheck"];
+            }
+            if(![_xianchengThd isExecuting])
+            {
+                [_xianchengThd start];
+            }
+            break;
+        case UTOSDK_BatteryListenStop:
+            break;
+        case UTOSDK_ShareToFaceBook:
+        {
+            [[TUYESDK sharedGameSDK] shareUrlWithResult:^(BOOL isSuccess) {
+                NSLog(@"%@%@",@"facebookShareURL ",isSuccess?@"YES":@"NO");
+            }];
+            
+            NSDictionary *d_i_ct = [NSDictionary dictionaryWithObjectsAndKeys:
+                                   [NSDictionary dictionaryWithObjectsAndKeys:@"1", @"state", nil],@"info",
+                                   [NSNumber numberWithInt:STOUni_FBShareResult], @"code", nil];
+            [self SendMessageToUnity:d_i_ct];
+            break;
+        }
+
+        case UTOSDK_GotoPingfen:
+            [[TUYESDK sharedGameSDK] appStoreReview];
+            break;
+        case UTOSDK_FansHouse:
+            [[TUYESDK sharedGameSDK] facebookFansHome];
+            break;
+        case UTOSDK_GotoShop:
+            [[TUYESDK sharedGameSDK] appStore];
+            break;
+        case UTOSDK_TrackEvent:
+            //isRepeat:NO浠呬笂鎶ヤ竴娆★紝YES鍏佽閲嶅涓婃姤锛堜竴鑸湅杩愯惀瑕佹眰锛�
+            [[TUYESDK sharedGameSDK] reportTrackEvent:[NSString stringWithFormat:@"%@",[d_i_ct objectForKey:@"eventName"]] isRepeat:[[d_i_ct objectForKey:@"eventName"] boolValue]];
+            break;
+    }
+}
+@end
+
+

--
Gitblit v1.8.0