Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Apple deprecating GameCenter playerId property

Discussion in 'iOS and tvOS' started by Petr777, Jul 16, 2019.

  1. Petr777

    Petr777

    Joined:
    Nov 8, 2017
    Posts:
    49
    Apple at WWDC 2019 announced that they will replace playerId with two new identifiers - teamPlayerId and gamePlayerId
    https://developer.apple.com/videos/play/wwdc2019/615/

    We are using Social.localUser.id for saving players progress on our server.
    If its return value will change in next versions of Unity and/or iOS, we need to prepare to this changes.

    How does Unity plan to handle this changes, and in which versions?
    Thank you!
     
  2. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    139
    Bump!

    Will Social.localUser.id return the new scoped gamePlayerID by default?
     
    Petr777 likes this.
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    Possibly, in a couple of years.
     
  4. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    139
    For the time being at least, the Prime31 Game Center plugin now exposes both gamePlayerID and teamPlayerID, so we have that at least.
     
  5. adrianadrian

    adrianadrian

    Joined:
    Mar 8, 2015
    Posts:
    7
    Any idea if Social.localUser.Authenticate will work with Apple Arcade?
     
  6. rmgomez

    rmgomez

    Joined:
    Oct 2, 2014
    Posts:
    18
    If you are building a game for apple arcade you can't use the Social features of Unity right now.
    For the save files you need to use the teamPlayerId and not the id returned by Social.localUser.

    Our studio and other apple arcade games are using:
    Prime31 GameCenter to auth.
    Prime31 iCloud for cross-save.

    Also you need both the ios/tvos and the macos plugins wich are sold separately.

    There is plenty of good information from other arcade devs in their support forum (you can see that for free) https://prime31.com/support/
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    Does Unity have a roadmap on when Social.localUser might be updated to support the newer stuff?

    I think Unity either needs to be on top of these things, OR, they should provide nothing at all, so we can all decide we need to write our own stuff.

    The current situation of Unity sort of providing an API but it being always out of date or not working properly can only result in frustrated users.

    Also Prime31 plugins are weird. He says the licenses are only valid for 2 years on his site, and somehow that applies to the asset store versions as well, which is weird since I don't think the standard Asset Store license for assets has any time limits.
     
    Last edited: Nov 19, 2019
  8. daniel_unity938

    daniel_unity938

    Joined:
    Jun 18, 2018
    Posts:
    5
    For anyone searching this issue, do note that Apple has changed to use Team Player Id in
    `generateIdentityVerificationSignatureWithCompletionHandler` at the moment of writing. However, this has not been reflected in the documentation as of writing.

    I am using the Prime31 plugin to extract the team player id, but feel free to write your own plugin, it's not that hard to do so.

    One other strange thing we've found is that players who are transitioning from the previous version using playerID to generate the signature need to sign out and sign in to their game center account again for the Team Player Id change to be reflected.
     
  9. voody2506

    voody2506

    Joined:
    Jun 21, 2018
    Posts:
    17
    Unity 2020.1
    Added GameID to the Social API it will return GamePlayerID when using GameCenter
    Social.localUser.ID will return the TeamPlayerID instead of GameCenterUsersID on iOS 12 and above
     
  10. matt_unity258

    matt_unity258

    Joined:
    Dec 4, 2017
    Posts:
    18
  11. anguha

    anguha

    Joined:
    May 4, 2023
    Posts:
    23
    Hey. Are there any resources available on migrating the gamecenter data from legacyId to the newer teamPlayerId? I upgrade to unity 2021.3.x and using the new teamPlayerId. But looks like its a clean slate and none of the gamecentre related data (for eg achievements) is available in the new Id.