Reputation: 33
I've been update unity 2017.4 to 2019.4 and build my game to ios. Problem is change Social.localuser.id type, start with "G:xxxxx" to "T:xxxxxx". I search some research, and find Apple change player Id gameCenter id to TeamPlayerId,PlayerId. My Game is live and to migrate Apples new id type it's need least 3 month use gamecenter id type.
-- 1. how can i get legacy gamecenterid?
and Unity 2020.1.6 release note in api section. "iOS: Added: Added a public accessor for the legacy Game Center player ID, to give games an easier pathway to migrate to the new ID types in iOS 12.4".
-- 2. But i don't know how can get legacy Game Center player ID?
-- 3. And Any plan to update, unity 2019 lts version to get legacy type Game Center Player Id?
thank you for reading.
Upvotes: 3
Views: 2161
Reputation: 332
I'm not 100% sure I'm reading the question correctly, and I know it's an old question, but I had a similar issue moving from Unity 2018 LTS to Unity 2019 LTS, and I believe the accepted answer doesn't cover the option I used to get this all working.
To get the new GameCenter ID, you'd use this call in Unity 2019 LTS
var gameCenterTeamId = Social.Active.localUser;
To get the legacy GameCenter ID (which would have previously been accessible in Unity 2017/2018 LTS with the call above) you'd use this call
var legacyGameCenterID = ((UnityEngine.SocialPlatforms.Impl.UserProfile) Social.localUser).legacyId;
Documentation for that 2nd call is here. The Unity docs recommend you only do it to migrate users over to the new GameCenter Team ID, as iOS has deprecated that old GameCenter player id entirely.
Upvotes: 5
Reputation: 756
As far as I know, Apple is not allowing any longer legacy API calls. They allow backward compatibility for the apps that are already on the store, but any new app must use the current framework.
~Pino
Upvotes: 0