diff --git a/sdk-intergration/Assets/Scenes/SampleScene.unity b/sdk-intergration/Assets/Scenes/SampleScene.unity index 577a4bf..f1fc3ea 100644 --- a/sdk-intergration/Assets/Scenes/SampleScene.unity +++ b/sdk-intergration/Assets/Scenes/SampleScene.unity @@ -1145,7 +1145,7 @@ MonoBehaviour: guestLoginBtn: {fileID: 1910171037} googoleLoginBtn: {fileID: 1188788679} facebookLoginBtn: {fileID: 1627053318} - LogOutBtn: {fileID: 0} + LogOutBtn: {fileID: 1304993150} log: {fileID: 2070325010} --- !u!4 &1788702880 Transform: diff --git a/sdk-intergration/Assets/Scripts/SDKTest.cs b/sdk-intergration/Assets/Scripts/SDKTest.cs index 9419479..10953d0 100644 --- a/sdk-intergration/Assets/Scripts/SDKTest.cs +++ b/sdk-intergration/Assets/Scripts/SDKTest.cs @@ -41,6 +41,6 @@ public class SDKTest : MonoBehaviour private void OnLogout() { - TYSdkFacade.Instance.LogOut(); + TYSdkFacade.Instance.Logout(); } } diff --git a/sdk-intergration/Packages/tysdk/Editor/IOSBuildProcessor.cs b/sdk-intergration/Packages/tysdk/Editor/IOSBuildProcessor.cs index 75c41fc..b09ea42 100644 --- a/sdk-intergration/Packages/tysdk/Editor/IOSBuildProcessor.cs +++ b/sdk-intergration/Packages/tysdk/Editor/IOSBuildProcessor.cs @@ -116,7 +116,7 @@ namespace tysdk.editor infoDict.SetBoolean("UIFileSharingEnabled", true); // Google - string googleClientID = "481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com"; + string googleClientID = "com.googleusercontent.apps.481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62"; CreateURLTypes(urlTypesArray.AddDict(), "google", googleClientID); //Facebook diff --git a/sdk-intergration/Packages/tysdk/Plugins/iOS/CustomAppController.m b/sdk-intergration/Packages/tysdk/Plugins/iOS/CustomAppController.m index 8127873..4328453 100644 --- a/sdk-intergration/Packages/tysdk/Plugins/iOS/CustomAppController.m +++ b/sdk-intergration/Packages/tysdk/Plugins/iOS/CustomAppController.m @@ -26,6 +26,8 @@ IMPL_APP_CONTROLLER_SUBCLASS(CustomAppController) config.serverUrl = SDK_LOGIN_SERVER_URL; config.gameId = SDK_GAMEID; config.openTerminalLog = XYSDK_DEBUG; + config.googleClientid = GOOGLE_CLIENTID; + config.launchOptions = launchOptions; config.launchApplication = application; [XYApi initWithConfig:config]; diff --git a/sdk-intergration/Packages/tysdk/Plugins/iOS/TYConfig.h b/sdk-intergration/Packages/tysdk/Plugins/iOS/TYConfig.h index 2fbbeb4..c57f198 100644 --- a/sdk-intergration/Packages/tysdk/Plugins/iOS/TYConfig.h +++ b/sdk-intergration/Packages/tysdk/Plugins/iOS/TYConfig.h @@ -13,6 +13,9 @@ #define SDK_CLOUDID @"128" #define SDK_CLIENTID @"IOS_5.00_tyGuest,facebook,appStore.appStore.0-hall20587.appStore.FishingMaster" +//Google +#define GOOGLE_CLIENTID @"481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com" + // 账号支付 - 服务域名 #define SDK_LOGIN_SERVER_URL @"https://128-hwsfsdk-sdk-online01.qijihdhk.com" // 账号支付 - Debug diff --git a/sdk-intergration/Packages/tysdk/Plugins/iOS/TYSDKInterface.mm b/sdk-intergration/Packages/tysdk/Plugins/iOS/TYSDKInterface.mm index a33691e..51fff2a 100644 --- a/sdk-intergration/Packages/tysdk/Plugins/iOS/TYSDKInterface.mm +++ b/sdk-intergration/Packages/tysdk/Plugins/iOS/TYSDKInterface.mm @@ -103,7 +103,20 @@ extern "C" { void UnityLoginOut() { - + NSLog(@"TYSdkInterface UnityLoginOut"); + [XYApi XYLogoutWithCompletion:^(XYResp * _Nonnull resp) { + if(resp.errCode == XYSuccess) + { + NSLog(@"TYSdkInterface UnityLoginOut Success"); + NSLog(@"%@", resp.respObj); + } + else + { + NSLog(@"TYSdkInterface UnityLoginOut Faild"); + NSLog(@"Error Code:%ld msg:%@", resp.errCode, resp.errStr); + } + + }]; } //支付 diff --git a/sdk-intergration/Packages/tysdk/Runtime/TYSdkFacade.cs b/sdk-intergration/Packages/tysdk/Runtime/TYSdkFacade.cs index b9945e3..f749de8 100644 --- a/sdk-intergration/Packages/tysdk/Runtime/TYSdkFacade.cs +++ b/sdk-intergration/Packages/tysdk/Runtime/TYSdkFacade.cs @@ -49,14 +49,16 @@ namespace tysdk public bool IsLoggedIn => _accountInfo != null; - public void LogOut() + public void Logout() { + UnityEngine.Debug.Log("Logout"); UnityBridgeFunc.UnityLoginOut(); _accountInfo = null; } - public void logOutByChannel() + public void LogoutByChannel() { + UnityEngine.Debug.Log("LogoutByChannel"); UnityBridgeFunc.UnityLoginOut(); _accountInfo = null; }