question

Dale Strickler avatar image
Dale Strickler asked

Does LoginWithIOSDevice id ignore the ID passed in under some set of conditions?

I read https://community.playfab.com/questions/17055/what-is-the-best-way-to-create-a-static-device-id.html and that is what I was trying to do. But PlayFab still logins with the current device ID, not the one I get from the KeyChain and pass in with the API request. I am using the Unity SDK.

Account ManagementAuthentication
10 |1200

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

1 Answer

·
pfnathan avatar image
pfnathan answered

Is your ID matches including case ?

5 comments
10 |1200

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

Dale Strickler avatar image Dale Strickler commented ·

Here is the pseudo code:

First Install:

If (KeyChain Has Id) --> NO
Get it from Unity's SystemInfo.deviceUniqueIdentifier (Say 'abc...')
Save to keyChain
Use 'abc...' in the LoginWithIOSDeivce request to login
PlayFab creates an account (Say '123...') linked to a device 'abc...'

Good!

Second install.

If (KeyChain Has id) --> Yes
Read it from KeyChain ('abc..')
Use 'abc...' in the LoginWithIOSDevice request to login
PlayFab creates an account (Say '789...') linked to a device 'xyz...'

Bad!

Looking at SystemInfo.deviceUniqueIdentifier on the second install the new device id it returned was 'xyz...'


It seems that when I pass 'abc...' from the keychain into the API call it somehow magically replaces it with the current device ID 'xyz..'

It is a pretty straight pass of the data to the PlayFab SDK which seems to do a pretty direct call to send the HTTP request. Yet somehow the id I set and double check is to be in the quest 'abc...' gets replaces with the current device ID 'xyz..' I never see the new id 'xyz..' in the debugging the code but when I look at the Playfab dashboard a new account now exists with the 'xyz..' device linked. VERY ODD!

0 Likes 0 ·
brendan avatar image brendan Dale Strickler commented ·

Well, the LoginWithIOSDeviceID call always uses the ID that's passed to it, so I think your question is really, is there anything in the SDK which is "helping" too much, and preventing you from using the Keychain ID. My question would be, how are you setting the Device ID for the call, exactly? If you explicitly set the deviceUniqueIdentifier to the Keychain ID, this should work for you. Can you give that a try?

0 Likes 0 ·
Dale Strickler avatar image Dale Strickler brendan commented ·

Note I have started a more detailed interaction with Brendan and the team than what I am posting here. Not always but under some conditions, the Unity SDK call to LoginWithIOSDeviceID does seem to replace the ID passed in with the device ID read from Unity's SystemInfo.deviceUniqueIdentifier. We are still investigating. It only seems to happen on an iOS device, not in the editor. I have seen it work with some builds of test code but others the replacement happens. Still sorting it out.

0 Likes 0 ·
Show more comments

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.