Does anyone know how to retrieve a ios device's serial number using xamarin forms in C#? I am trying to develop a mobile application, so I would need to differentiate the devices.
For xamarin forms android device I am retrieve serial number using below code:
Java.Lang.String serialnum = (Java.Lang.String)(get.Invoke(c, "gsm.sn1"));
That information is private to the user and will not be accessible.
If you need to identify a user in some way, you can use the IdentifierForVendor
property - that's a unique identifier for a device based on a AppStore developer.
var id = UIDevice.CurrentDevice.IdentifierForVendor;