[F] iOS Google login, client id
This commit is contained in:
@@ -1145,7 +1145,7 @@ MonoBehaviour:
|
|||||||
guestLoginBtn: {fileID: 1910171037}
|
guestLoginBtn: {fileID: 1910171037}
|
||||||
googoleLoginBtn: {fileID: 1188788679}
|
googoleLoginBtn: {fileID: 1188788679}
|
||||||
facebookLoginBtn: {fileID: 1627053318}
|
facebookLoginBtn: {fileID: 1627053318}
|
||||||
LogOutBtn: {fileID: 0}
|
LogOutBtn: {fileID: 1304993150}
|
||||||
log: {fileID: 2070325010}
|
log: {fileID: 2070325010}
|
||||||
--- !u!4 &1788702880
|
--- !u!4 &1788702880
|
||||||
Transform:
|
Transform:
|
||||||
|
|||||||
@@ -41,6 +41,6 @@ public class SDKTest : MonoBehaviour
|
|||||||
|
|
||||||
private void OnLogout()
|
private void OnLogout()
|
||||||
{
|
{
|
||||||
TYSdkFacade.Instance.LogOut();
|
TYSdkFacade.Instance.Logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace tysdk.editor
|
|||||||
infoDict.SetBoolean("UIFileSharingEnabled", true);
|
infoDict.SetBoolean("UIFileSharingEnabled", true);
|
||||||
|
|
||||||
// Google
|
// Google
|
||||||
string googleClientID = "481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com";
|
string googleClientID = "com.googleusercontent.apps.481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62";
|
||||||
CreateURLTypes(urlTypesArray.AddDict(), "google", googleClientID);
|
CreateURLTypes(urlTypesArray.AddDict(), "google", googleClientID);
|
||||||
|
|
||||||
//Facebook
|
//Facebook
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ IMPL_APP_CONTROLLER_SUBCLASS(CustomAppController)
|
|||||||
config.serverUrl = SDK_LOGIN_SERVER_URL;
|
config.serverUrl = SDK_LOGIN_SERVER_URL;
|
||||||
config.gameId = SDK_GAMEID;
|
config.gameId = SDK_GAMEID;
|
||||||
config.openTerminalLog = XYSDK_DEBUG;
|
config.openTerminalLog = XYSDK_DEBUG;
|
||||||
|
config.googleClientid = GOOGLE_CLIENTID;
|
||||||
|
|
||||||
config.launchOptions = launchOptions;
|
config.launchOptions = launchOptions;
|
||||||
config.launchApplication = application;
|
config.launchApplication = application;
|
||||||
[XYApi initWithConfig:config];
|
[XYApi initWithConfig:config];
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
#define SDK_CLOUDID @"128"
|
#define SDK_CLOUDID @"128"
|
||||||
#define SDK_CLIENTID @"IOS_5.00_tyGuest,facebook,appStore.appStore.0-hall20587.appStore.FishingMaster"
|
#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"
|
#define SDK_LOGIN_SERVER_URL @"https://128-hwsfsdk-sdk-online01.qijihdhk.com"
|
||||||
// 账号支付 - Debug
|
// 账号支付 - Debug
|
||||||
|
|||||||
@@ -103,7 +103,20 @@ extern "C" {
|
|||||||
|
|
||||||
void UnityLoginOut()
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
//支付
|
//支付
|
||||||
|
|||||||
@@ -49,14 +49,16 @@ namespace tysdk
|
|||||||
|
|
||||||
public bool IsLoggedIn => _accountInfo != null;
|
public bool IsLoggedIn => _accountInfo != null;
|
||||||
|
|
||||||
public void LogOut()
|
public void Logout()
|
||||||
{
|
{
|
||||||
|
UnityEngine.Debug.Log("Logout");
|
||||||
UnityBridgeFunc.UnityLoginOut();
|
UnityBridgeFunc.UnityLoginOut();
|
||||||
_accountInfo = null;
|
_accountInfo = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logOutByChannel()
|
public void LogoutByChannel()
|
||||||
{
|
{
|
||||||
|
UnityEngine.Debug.Log("LogoutByChannel");
|
||||||
UnityBridgeFunc.UnityLoginOut();
|
UnityBridgeFunc.UnityLoginOut();
|
||||||
_accountInfo = null;
|
_accountInfo = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user