iOS Question Is Device ID changes between debug and release?

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all.

I'm using this code to get the device ID
B4X:
Sub GetVendorIdentifier As String
    Dim no As NativeObject
    no = no.Initialize("UIDevice").RunMethod("currentDevice", Null)
    Dim id As Object = no.GetField("identifierForVendor").GetField("UUIDString")
    Return id
End Sub

What I've noticed that it changes between debug mode and release mode.

For example - in debug mode I registered the device id with my web site and I see what it was. Then I uploaded my app to the apple store, deleted the debug version of the app from the phone, installed again on the same phone under TestFlight. The device id has was different. Why?

Thanks.
 

Semen Matusovskiy

Well-Known Member
Licensed User
Guess you try to identify user phone. To do this you can use a keychain (Phone object, ,KeychainGet/Put). Uninstall is not dangerous
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Guess you try to identify user phone. To do this you can use a keychain (Phone object, ,KeychainGet/Put). Uninstall is not dangerous
Thanks, if the user deleted the app from his phone he needs to register it again so I don't care what it was before. I didn't expect that the Device ID changes between development and the app store as Erel said in #2
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Documentation says
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…