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

I’m using the Social.localUser.Authenticate() function (Unity - Scripting API: Social.localUser) 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: [iOS] Social.Authenticate bug on user cancel ? - Questions & Answers - Unity Discussions

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?

HI,Does you have solved this issue?

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.

2 Likes

Thanks bro.