Issues Surrounding GKPlayer's playerId Deprecation in iOS 13

I watched the video on Game Center Player Identifiers and saw that GKPlayer's playerId is deprecated in iOS 13, to be replaced with gamePlayerId and teamPlayerId. https://developer.apple.com/videos/play/wwdc2019/615/


Our games allow players to login with Game Center to join and play games hosted on our servers. We use playerId to identify players so that they can play and earn rating points under their own account. The video says to transition to using teamPlayerId to identify players, which by itself isn't too complicated, but I'm concerned that this hasn't been fully thought through and some players may lose access to their accounts in systems like ours.


1. As player's login during the transition period, we will need to read both playerId and teamPlayerId in order to change their account on our servers to the new id. After the transition, when playerId is removed from iOS, it seems that any player who hasn't logged in, perhaps returning to the app after a long break, will no longer be able to access their previous account. They will appear to us as a completely new player. It seems we need some proactive way, like a server API, to convert playerId values to the new teamPlayerId.


2. In the video, the presenter says that there is a "very rare case" when teamPlayerId and gamePlayerId will not be available to uniquely identify the player. In this case, we will have no method of identifying the player and allowing them to access an account on our servers. Nothing is explained about what this "very rare case" is or how to help users correct this. Slide 13 shows how to check for the error case, but does not provide any example error message or error handling.


3. We use GKLocalPlayer's generateIdentityVerificationSignatureWithCompletionHandler API to authenticate players on our servers. This API has not been updated, and it's documentation still says to use playerId. It seems a new API will be needed to deal with players having multiple, different ids.


I'm interested to hear from other developers who use Game Center as a login method for their own servers and are facing these kinds of issues. I'm hoping this post might get the attention of someone at Apple, but I'll also try to engage them in other ways and report anything I find out.

I'm in exactly the same situation as you. I've been using playerID for authentication for years.


By deprecating playerID, Apple is basically deleting all my users' accounts and data. Because what's the difference between losing your account and data, and not being able to log in to access it?


This will be a data loss "bug" on a spectacular scale.


I have started storing teamPlayerID/playerID pairs on my server but am already running into problems. At least one player on my server has a teamPlayerID of "Unavailable Player Identification" but a valid playerID. I have no idea what to do about this.


So you are not alone here. Any news from Apple?

Any update on this status? the team/game player ids not being consistent for a player will mean people losing their saved data.
We have the same problem and I am just here bumping this thread, hoping from a reply from Apple!
I wanted to provide an update on the issues we're continuing to see with teamPlayerID. We've continued to collect teamPlayerID values for our users, as an additional identifier for their accounts. However, we are still dependent on the deprecated playerID identifier for two reasons:
  1. On any given day, we are seeing that scopedIDsArePersistent is false for about 1% of our Game Center users. In this case, teamPlayerID is just a transient value and we don't collect it. Apple described that scopedIDsArePersistent could be false in a "very rare case", but in our opinion, this is happening much more often than we would consider "very rare". Obviously, when scopedIDsArePersistent is false, there is no alternative API to reliably identify users other than the deprecated playerID. We have reported this issue to Apple (FB8988340).

  2. Even when scopedIDsArePersistent is true, teamPlayerID can change for the same Game Center user. We've been collecting teamPlayerID as an additional identifier for user accounts only when scopedIDsArePersistent is true, but we still have accounts with multiple team-scoped identifiers associated with them. These accounts have one playerID identifier starting with "G:" or "U:", but can have two, three, or more associated identifiers starting with "T:". This bug seems to be very common. We have about 100 occurrences a day where we add a new team-scoped identifier to the account for a user that already had a different team-scoped identifier associated with it. This bug has been reported to Apple multiple times (FB8988326, FB7137603).

We believe that Apple deprecated playerID because it can be abused to track users across apps. Because of this, we are assuming the worst, which is that Apple will remove playerID before it has fixed the problems with teamPlayerID. While we would prefer to continue using Game Center if it is fixed, we have started making preparations to prompt our Game Center users to migrate to other login options, like Facebook, Google, and Sign In with Apple. I'd be interested to hear if other developers are encountering the same issues I mentioned above.

I'm experiencing similar issues, e.g. teamPlayerID and gamePlayerID are both "UnknownID". This just started happening between 2 devices and 2 GC accounts that used to work (my own devices and accounts). Not sure how to fix this so I'm wondering if there's any response from Apple on the bug reports reported by @RajDoshi.

I noticed that when switching Game Center accounts the GKLocalPlayer authenticateHandler is called 3 times in quick succession (which in itself is not ideal). The first 2 times teamPlayerID and gamePlayerID return "UnknownID" but on the 3rd call it displays the correct IDs. However, the legacy playerID displays correctly all 3 times.

The GKPlayerAuthenticationDidChangeNotificationName which I have used in the past to reliably track users changing accounts is only called once on switch which is correct, however, it returns "UnknownID" for teamPlayerID and gamePlayerID, rendering it unusable unless I stick with the legacy playerID which still works as expected.

Since the authenticateHandler returns the correct IDs eventually, I could work around it by ignoring invalid IDs and waiting until they become valid. But this would be hacky, and leave me having to check against a particular ID format which is usually not recommended as the formats could change.

It's 2024 and I'm also heavily considering sticking with the legacy playerID as it works perfectly.

Issues Surrounding GKPlayer's playerId Deprecation in iOS 13
 
 
Q