question

paveldolgoter avatar image
paveldolgoter asked

Our loginwithcustomid call does not receive responses on the iOS, but only on Android build.

Hi, thank you for the amazing solution, it is a pleasure to work with such highly organized and powerful framework. We have the game that uses silent authentication and runs perfectly fine on Android, but on the iOS built that is 1:1 identical and is built with Unity Cloud Build services (while Android is built locally) does not receive any responses, only sends them. What could be a possible reasons for this? Does Playfab vital editor settings are automatically copied with a Unity Cloud Build? Here are not closed logs (hope that makes sense as a valid indicator)

And here is the code itself:

     PlayFabClientAPI.LoginWithCustomID(new LoginWithCustomIDRequest()
        {
            TitleId = PlayFabSettings.TitleId,
            CustomId = SystemInfo.deviceUniqueIdentifier,
            CreateAccount = true,
            InfoRequestParameters = InfoRequestParams
    }, (result) =>
        {
            //Store Identity and session
            _playFabId = result.PlayFabId;
            _sessionTicket = result.SessionTicket;


            //check if we want to get this callback directly or send to event subscribers.
            if (callback == null && OnLoginSuccess != null)
            {
                //report login result back to the subscriber
                OnLoginSuccess.Invoke(result);
            }
            else if (callback != null)
            {
                //report login result back to the caller
                callback.Invoke(result);
            }
        }, (error) =>
        {
            if (callback == null && OnPlayFabError != null)
            {
                OnPlayFabError.Invoke(error);
            }
            else
            {
                //make sure the loop completes, callback with null
                callback.Invoke(null);
                //Output what went wrong to the console.
                Debug.LogError(error.GenerateErrorReport());
            }
        });
s8qte.png (66.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

According to your screenshots, the silent login on the iOS also generates the event – entity_logged_in and the player_logged_in, is it right? If so, it represents the login method works fine on the iOS.

Do you mean the login method on the iOS didn’t generate the event client_focus_change, client_session_start and the player_device_info? For clarification, these three events are optional. They are the custom events that generate by the PlayFab Unity SDK and designed to report the status of client session to the Game Manager. The code to send these events is written in this script file - UnitySDK/ScreenTimeTracker.cs at 6311058c23a6fdb055adeb06e5bb7f788627f89c PlayFab/UnitySDK GitHub. You can find the same file in your Unity SDK. As the source code showed, this script only will work when you both enable the Entity API and the Client API. Since the Client API - LoginWithCustomID has worked, could you please check have you enabled the Entity API for this project?

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

paveldolgoter avatar image paveldolgoter commented ·

Hi, @Sarah Zhang. Yes, iOS does genereate entity_logged_in and the player_logged_in. Thank you for the explaining Entity API, I've checked and it is enabled.

My concern is that the LoginWithCustomID doesn't receive any callbacks, nor success, nor error and it doesn't go anywhere, so the iOS client doesn't know that he have logged in, although the server receives entity_logged_in and the player_logged_in. So I thought the lack of similar to Android events was a sign the the iOS login call is not ideal and I made some mistakes in my configuration, or maybe Unity Cloud Build doesn't support building the game with Playfab?

0 Likes 0 ·
ungy7.png (28.6 KiB)
Sarah Zhang avatar image Sarah Zhang paveldolgoter commented ·

Thanks for your response. We will try to reproduce it. And we are not so familiar with Unity Cloud Build. Could you please also use the local build to try again?

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.