Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by Le_nain · Apr 02, 2012 at 01:35 PM · iosbugauthenticationgamecentercancel

[iOS] Social.Authenticate bug on user cancel ?

Hi,

I'm currently implementing the Game Center for my app, and I'm running into a problem:

  1. At Authentication time, I call Social.localUser.Authenticate(GCAuthenticationHandler); and it works like a charm => I get my AlertView showing and prmpting me to login.

  2. If I do login, everything is fine => user gets recognized and I can report/display scores.

  3. Though if I press the CANCEL button at login time, here comes the problem => it does cancel the login as it should, but from that point forward I can never login again (by calling Social.localUser.Authenticate(GCAuthenticationHandler); again) unless the app is killed. Unless I kill my app, all I get is Failed to authenticate local user The requested operation could not be completed because local player is already authenticating.

It seems like Unity doesn't terminate the process of authentication if the user cancels, and there is no way for me to manually "reboot" this process.

This is very bad and definitely not user-friendly to have to kill your app in case you didn't want to login to GC at the first place, or even if you did hit the cancel button by mistake...

If anyone encoutered this problem, or know anything about this, please post. Otherwise I guess I'll have to file a bug to them.

Thanks

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DANNY · Apr 18, 2012 at 04:14 AM 0
Share

I am having this same problem... Any luck with solving this so far Le_nain?

avatar image Le_nain · Apr 24, 2012 at 01:10 PM 0
Share

After 20 days without anyone telling me I'm mistaken, I can assume that this is a bug. Reported it today (24/04/12) through Unity's Bug Report, if anyone is willing to see the state of the ticket it can be found here : http://fogbugz.unity3d.com/default.asp?460166_b18pft9s8g64ur55

avatar image wkwan · Jun 25, 2015 at 07:37 PM 1
Share

So 3 years later, I'm still getting this. Testing with the iiPad 2. Anyone have a solution? I even notice this in released games in the top charts.

avatar image illuminat wkwan · Sep 08, 2015 at 08:55 PM 0
Share

@wkwan: i have the same problem, but someone answered on the stackoverflow thread from W$$anonymous$$iddBdot that this only happens if you mix sandbox and non testing accounts. I can't test it right now because I don't have the game in production now.

look here for the comment of taras

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by WKiddBdot · Apr 26, 2012 at 04:55 PM

This is not a bug within Unity. I know this because I am having the exact same problem while writing straight Objective-C code in XCode. My issue is exactly the same as yours; posted a SO question regarding it here:

http://stackoverflow.com/questions/10335134/game-center-doesnt-respond-to-authenticatewithcompletionhandler-request-ios

Hopefully someone will respond with a solution!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Le_nain · Apr 26, 2012 at 06:02 PM 0
Share

Well, that surprises me, considering that I used to work for me before Unity 3.5 was released (I was using Prime31's plugin). Though, looking at your pots on stackoverflow, I can't really deny what you're saying here and call you a liar ;) since you described exactly my problem. $$anonymous$$aybe this is just a coincidence, there might have been a "cross-update" between iOS and UT around the same date which made me believe it comes from UT. Anyways, thanks for your answer, it won't change much my problems as I already considered it as a "not fixable by myself bug" but at least I know the real culprit. I can now point my finger at Apple and shout my "DA$$anonymous$$N YOU" ;)

avatar image
0

Answer by DANNY · Apr 18, 2012 at 04:56 AM

So I looked into the unity script reference documentation and found the following statements.

http://unity3d.com/support/documentation/ScriptReference/ILocalUser.Authenticate.html

Authenticate the local user to the current active Social API implementation and fetch his profile data.

This should be done before any other calls into the API. Depending on the platform this might trigger a blocking dialog for providing login details.

I guess this is an iOS thing, it gets blocked. It says a comment about go to the Game Center and log in. So I believe the solution might be to let the iOS handle it this way.

This reminds me of not using any exit application code in iOS apps. You should only use the home button, well it seems they want the game center authentication to maintain the uniformity.

I am going to solve this on my game removing the leader-board link in my app if authentication fails, and only displaying it in case it succeeds.

I hope this helps,

Danny

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Le_nain · Apr 18, 2012 at 07:18 AM 0
Share

Hi DANNY, - About the "blocking dialog for providing login details.", they just mean that the AlertView that pops for you to provide the login details is modal, meaning this is the only thing that can take input at this time (=>"blocking"). - And about the "comment about go to the Game Center and log in", you're right, it IS part of the GameCenter process to prevent the login popup to appear, but only if the user did dismiss the login popup several times in a row (the number "3" pops out in my $$anonymous$$d, if I recall correctly). This is fine because it's designed to be as is, but BEFORE you dismiss the login popup 3 times in a row you should be able to display the popup at will (I was using Prime31's plugin until Unity3.5, and it worked as intended)

So it definitely is a bug. I didn't have time to file it yet with a repro case, but I'll definitely do that a the Unity $$anonymous$$m needs to know about it. Still, thanks for your answer :)

avatar image DANNY · Apr 18, 2012 at 05:31 PM 0
Share

Thank you :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 2017.3 Game Center authentication bug 1 Answer

[Android] GameCenter Social.localUser id uniqueness 0 Answers

Help with Game Center login. 1 Answer

Help with XCode iOS GameCenter EXC_BAD_ACCESS crash bug 1 Answer

Sound stutters and stops when coming back from background (iOS 7) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges