question

brendan avatar image
brendan asked

Identifying players cross-device

Question from a developer:

I am using PlayFab on iOS with the iOS SDK. Is it possible to identify the same user across devices when we do not have linked accounts? We do not ask our players to log in, but would like to know the same player on a different device.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

In order to sign a player into an account (which is necessary to do most anything), you need to have some form of authentication. That authentication connects to a single account in the service (which can then have other authentication mechanisms attached to it with the Link... API calls). So while you could use Device ID or Custom ID for a zero-friction login, to get the player back to that same account on another device, either the players have to give you, or you have to give them, something that uniquely identifies them, so that they can enter it on the other device. Usually, that's a shared authentication system like Facebook or Google Plus, but it could also be a generated code. We would not recommend having the player enter a text code which you then use as a Custom ID, since you'd have cases of players using common words for their IDs, which other players would then find and enter to hijack their accounts, creating a customer support headache for you.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

paul@sparkleapps.com avatar image
paul@sparkleapps.com answered

Thanks for the info Brendan.  I know the ideal is to get them to log in with Facebook or Google etc, but I just know if we do that we won't get 100% of players to do that. So I need something with works 100%. What I am thinking is to  create our own unique ID, say the IDFV on iOS, and use that as the unique identifer for authentication. This is unique on device. We could then store that in iCloud too, and check iCloud when a player installs the app. If there's a pre-existing ID in icloud for our game, we know they have it installed on another device, and can just use the value from iCloud instead of generating a new unique ID on the second device. Do you know is there an API on iOS we can use to fetch the PlayFab player ID ? Eg: 8D07AEB579867835

 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Yes, if your title is specifically only on iOS, you can use the iCloud to store a unique identifier, though we would recommend generating a GUID and using that.

The PlayFab ID is always returned in the user's account info, which can be retrieved with the GetAccountInfo and GetUserCombinedInfo API calls.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.