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

    Joined:
    Mar 14, 2014
    Posts:
    1
    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

    Agent_007

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

    SouthernCoder69

    Joined:
    Oct 23, 2013
    Posts:
    74
    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

    6.1
    Apps that display any Player ID to end users or any third party will be rejected
    6.2
    Apps that use Player IDs for any use other than as approved by the Game Center terms will be rejected
    6.3
    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
    6.4
    Game Center information, such as Leaderboard scores, may only be used in Apps approved for use with Game Center
    6.5
    Apps that use the Game Center service to send unsolicited messages, or for the purpose of phishing or spamming will be rejected
    6.6
    Apps that excessively use the network capacity or bandwidth of Game Center will be rejected
    6.7
    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