Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Social.localUser.id returning Unavailable Player Identification

Discussion in 'iOS and tvOS' started by bradakan, Jun 30, 2021.

  1. bradakan

    bradakan

    Joined:
    Feb 17, 2014
    Posts:
    4
    I have 2 devices one old iphone 6 where if i autenticate i can get the username and id.
    But on the iphone 12 pro max i try my game on i do succesfully authenticate and get a username but i get "Unavailable Player Identification" when i call Social.localUser.id

    The logcat does say something about the iphone 12 not being recognized by Game Center but on the old iphone it does work properly.and not get that message.
    So what's going on?
    I mean how could the same game be recognized by game center on one phone and not on the other?

    So now i'm stuck with it working on the really old iphone i have and had as my only test device for most of the time and it not working on the new iphone.
    And the other people who installed it through testflight also all seem to get "Unavailable Player Identification" as an id and i need that id to link users to data.

    I hope someone can help me out because this has been bugging me for days now and i'm at a loss on what to do.
     
    dan_ginovker and MiningGil like this.
  2. MiningGil

    MiningGil

    Joined:
    May 14, 2020
    Posts:
    1
    I have same issue
     
  3. bradakan

    bradakan

    Joined:
    Feb 17, 2014
    Posts:
    4
    Try adding a leaderboard and/or achievement to your gamecenter in app store connect.
    Did that yesterday and now i get a teamPlayerID
    Still in the process of verifying if it's a perfect fix but it seems to have fixed it for me, even tho we don't even use a leaderboard or achievements in our game i just wanted the teamPlayerID to link a user to game data.
     
  4. ianwong_unity

    ianwong_unity

    Joined:
    Apr 12, 2022
    Posts:
    7
    I tried adding a leaderboard and achievement and it currently still shows "Unavailable Player Identification". (not sure if need some wait) But is there some proper fix by now?
     
  5. ianwong_unity

    ianwong_unity

    Joined:
    Apr 12, 2022
    Posts:
    7
    Bump, anyone has figured this out? I found that casting the localUser to UserProfile, id and game id shows "Unavailable Player Identification", while legacyId could show some sensible-looking id and the username is correct. (I'm testing with iOS 15.6.1)
     
  6. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
  7. dirty-rectangle

    dirty-rectangle

    Joined:
    Apr 23, 2015
    Posts:
    78
    I am using the latest version of the Unity plugins from Apple and still see a number of iPhone devices in our telemetry returning 'Unavailable Player Identification' for the GamePlayerId when Apple.GameKit.GKLocalPlayer.Authenticate() is called.

    _localPlayer = await Apple.GameKit.GKLocalPlayer.Authenticate();

    Which has a native implementation for Authenticate();

    So it looks like it s not a Unity specific issue.

    I tried adding a leaderboard and achievement but still see 'Unavailable Player Identification'

    As of yet i don't have any data or logcats from the devices that have this issue.
     
  8. anguha

    anguha

    Joined:
    May 4, 2023
    Posts:
    23
    For me in Unity 2021.3.14f1
    Social.localUser.ID returns Unavailable Player Identification after moving away from using legacyId. Could anyone find a fix?
     
    Last edited: Jul 25, 2023
  9. TeorikDeli

    TeorikDeli

    Joined:
    Apr 6, 2014
    Posts:
    117
    Still broken on 2021.3.26f1 (I don't think this fixed in .27f1 or .28f1) and I can't use Apple's unityplugins. It crashes or gives linker errors. How can we properly use Game Center with Unity? This is an important problem. Apple doesn't care, Unity doesn't care =/
     
  10. anguha

    anguha

    Joined:
    May 4, 2023
    Posts:
    23
    Did anyone try the same approach with Unity 2020.x ? I think it works for Unity 2020 but not 2021. Cannot confirm though
     
  11. TeorikDeli

    TeorikDeli

    Joined:
    Apr 6, 2014
    Posts:
    117
    I remember that it was working with 2020.3. But, it was just a little test and I don't remember the exact version. Anyone with the 2022.3?

    Well, we'll just remove our high score list and add a button for high scores to open Game Center UI :'( Bad UI, bad UX for a game.
     
  12. anguha

    anguha

    Joined:
    May 4, 2023
    Posts:
    23
    bradakan Did you have to enable the leaderboard under the appstore section as well for it to work? Or just creating a leaderboard (not live) also helped?