Discussions
infinity Adapty Identify
about 2 months ago by Matvey Brushkou
Hi, my Unity application freezes when I do Adapty.Identify, just no callback comes back
public SDK key added to the manifest,
on the adapty side of the console, I specified the package name in the android settings, in Unity I also specified the same package name and started the keystore, clicked Resolve
I get this error on my mac AdaptyUnityError.DecodingFailed(System.NullReferenceException: Object reference not set to an instance of an object
at AdaptySDK.SimpleJSON.JSONNode.Parse (System.String aJSON) [0x0044c] in ...
public static async UniTask<bool> TryLoginAsync(string userId)
{
if (_loginStatus != AsyncOperationStatus.NotStarted)
{
return false;
}
_loginStatus = AsyncOperationStatus.Pending;
Debug.Log($"TryLoginAsync : {userId}");
Adapty.Identify(userId, OnIdentifyCompleted);
await UniTask.WaitUntil(() => _loginStatus != AsyncOperationStatus.Pending);
return _loginStatus == AsyncOperationStatus.Complete;
void OnIdentifyCompleted(Adapty.Error error)
{
Debug.Log($"OnIdentifyCompleted");
if (error != null)
{
Debug.LogError(error.Detail);
_loginStatus = AsyncOperationStatus.Failed;
}
_loginStatus = AsyncOperationStatus.Complete;
}
}
userId is Guid.NewGuid().ToString()