[F] iOS Google login, client id

This commit is contained in:
2024-08-05 18:20:34 +08:00
parent badf4d6250
commit dd43d9db26
7 changed files with 26 additions and 6 deletions

View File

@@ -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:

View File

@@ -41,6 +41,6 @@ public class SDKTest : MonoBehaviour
private void OnLogout()
{
TYSdkFacade.Instance.LogOut();
TYSdkFacade.Instance.Logout();
}
}

View File

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

View File

@@ -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];

View File

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

View File

@@ -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);
}
}];
}
//支付

View File

@@ -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;
}