[F] Apple link callback

This commit is contained in:
2024-08-26 14:42:08 +08:00
parent e6349d1501
commit d449fee825
4 changed files with 10 additions and 4 deletions

View File

@@ -73,6 +73,7 @@ public class SDKTest : MonoBehaviour
_linkGoogleBtn.onClick.AddListener(OnLinkGoogle);
_checkGoogleBtn.onClick.AddListener(OncheckGoogle);
_linkFacbookBtn.onClick.AddListener(OnLinkFacebook);
_linkAppleBtn.onClick.AddListener(OnLinkApple);
_checkFacbookBtn.onClick.AddListener(OncheckFacebook);
_payTestBtn.onClick.AddListener(OnPayTestBtn);
_payListBtn.onClick.AddListener(OnPayListBtn);
@@ -307,6 +308,13 @@ eb68f93a08156e04
_messageTxt.text = $"\n link facebook account : {isSuccess}";
}
private async void OnLinkApple()
{
_messageTxt.text = string.Empty;
var isSuccess = await TYSdkFacade.Instance.LinkAccount(EAccoutType.Apple);
_messageTxt.text = $"\n link facebook account : {isSuccess}";
}
private async void OncheckGoogle()
{
_messageTxt.text = string.Empty;

View File

@@ -325,7 +325,7 @@ extern "C" {
else
{
NSLog(@"TYSdkInterface LinkApple Faild");
UnityLogoutFacebook();
UnityLogoutApple();
UnitySendMessage("TYSdkFacade","LinkAccoutResult", "0");
}

View File

@@ -312,7 +312,7 @@ namespace tysdk
if (callbacks.TryGetValue("LinkAccoutResult", out var action))
{
action.Invoke(result);
callbacks.Remove("LoginResult");
callbacks.Remove("LinkAccoutResult");
}
}

View File

@@ -9,9 +9,7 @@ namespace tysdk
hwGoogle,
hwFacebook,
hwGuest,
#if UNITY_IOS
Apple,
#endif
none
}