iOS Question iOS device unique identifer

cwt

Active Member
Licensed User
Longtime User
I need to use a unique identifer for each iOS device running my app - this identifer will be stored on the server side so when my app sends data to the server the user can be identified. Any id that is unique to the device will work. Is there a way to programmatically get the either the serial number, imei, or udid of the device so it can be sent to the server API? I am just starting to use B4i (I have used B4A for years) so please forgive any dumb questions I may ask. I am totally new to iOS and Apple products.
 

Biswajit

Active Member
Licensed User
Longtime User
B4X:
Dim no as NativeObject
log(no.Initialize("UIDevice").GetField("currentDevice").GetField("identifierForVendor").GetField("UUIDString"))
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
How about getting the serial number via code? I would rather use the serial number instead of the 40-character long UDID. What would be the code to get the serial number of the iOS device?
 
Upvote 0

Biswajit

Active Member
Licensed User
Longtime User
You cant retrieve any device-specific information. Apple did not provide any public API for retrieving those information. All you can do is fetch the vendor-specific UUID. If you use any private API to fetch those values then the app will be rejected.

 
Upvote 0
Top