Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Game Player IDs

I am going to work on a game project for the first time. I have some thoughts in pieces, but couldn't get all things to make sense.

The Game can only be played if the user is logged in. Plan to let user has the following options to login:

  1. Game Center ID
  2. Facebook ID
  3. registered ID (email/username/password) with my server.

Question: does it make sense? Looks like there is no API to get user's Game Center ID, so that I can post it to my server. For Facebook ID, I can get it and post to server. Registered ID surely no programed.

I need those IDs to be posted to server because, I need to keep record in server for a game achievement award system by us, apart from Game Center's Leader Board.

Thanks in advance.

like image 542
Cullen SUN Avatar asked Dec 30 '25 18:12

Cullen SUN


1 Answers

You can get a unique player ID for Game Center by playerID property of GKPlayer class. See GKPlayer Class Reference.

like image 68
Hailei Avatar answered Jan 02 '26 07:01

Hailei



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!