Search Unity

Get Game Center username of already logged in player

Discussion in 'iOS and tvOS' started by Umair Bhatti, Mar 14, 2014.

  1. Umair Bhatti

    Umair Bhatti

    Mar 14, 2014
    I am using Unity's Social class to access Game Center functionality. I only want to get the username of a player who is already logged into Game Center. If the player is not logged in I do not want to bother him with a login.

    The problem I am facing is that I cannot access the user name without calling Authenticate. If I call authenticate on a device where the player is NOT logged in, it automatically pops up the login dialog.

    Is there any way to avoid the Game Center Login popup? OR Is there any way to access Game Center user info without calling Authenticate?
  2. Agent_007


    Dec 18, 2011
    AFAIK you have to always call it. Since players have the opportunity to cancel the gamecenter for certain games.
  3. SouthernCoder69


    Oct 23, 2013
    You can't. 6.1 clearly says you can't display the player ID. My last app got rejected for a testing popup still left in that had the players name.

    6. Game Center

    Apps that display any Player ID to end users or any third party will be rejected
    Apps that use Player IDs for any use other than as approved by the Game Center terms will be rejected
    Developers that attempt to reverse lookup, trace, relate, associate, mine, harvest, or otherwise exploit Player IDs, aliases, or other information obtained through Game Center will be removed from the iOS Developer Program
    Game Center information, such as Leaderboard scores, may only be used in Apps approved for use with Game Center
    Apps that use the Game Center service to send unsolicited messages, or for the purpose of phishing or spamming will be rejected
    Apps that excessively use the network capacity or bandwidth of Game Center will be rejected
    Apps that transmit viruses, files, computer code, or programs that may harm or disrupt the normal operation of the Game Center service will be rejected