Search Unity

Social.localUser.Authenticate second call fails without showing GameCenter login popup

Discussion in 'iOS and tvOS' started by wkwan, Jun 25, 2015.

  1. wkwan

    wkwan

    Joined:
    Sep 14, 2014
    Posts:
    27
    I'm using the Social.localUser.Authenticate() function (http://docs.unity3d.com/ScriptReference/Social-localUser.html) to log the player into GameCenter at the start of the app. On the start of the app, when I call this function, it works as expected, showing the GameCenter login popup. However, if the user cancels the popup, if I call it again (when the player clicks the Leaderboard button when not logged in), it always fails without even showing the popup.

    I found this question on UnityAnswers: http://answers.unity3d.com/questions/234489/ios-socialauthenticate-bug-on-user-cancel-.html

    It's 3 years old and has no solution. I'm testing on the iPad 2, with GameCenter Sandbox mode using a test account on iTunes Connect.

    Anyone encountered this problem before?
     
  2. melefans

    melefans

    Joined:
    Aug 1, 2016
    Posts:
    36
    HI,Does you have solved this issue?
     
  3. r-pedra

    r-pedra

    Joined:
    Dec 4, 2015
    Posts:
    104
    Hey,
    This is an Apple decision to never ask the user again to login if he cancelled once. The only way a user that cancelled before, succeed to login is to do it in the phone settings.
    You can call the function 1 Million time, if he cancelled one time, it will never ask him again.

    A thing you need to know is that most users are logged in Game Center by default when they first boot their phone.

    To conclude:
    You can't ask to log in Game Center more than one time if he cancelled the first time.
     
    Nolex and melefans like this.
  4. melefans

    melefans

    Joined:
    Aug 1, 2016
    Posts:
    36
    Thanks bro.