2

enter image description hereIn my app, I am trying to get all information of the device and to be displayed in app screen.

I got some of the informations, but not getting code to obtain UDID, Serial number and model identifier of a device, what we can able to see in iTunes.

I can able to get UUID, but my request is to get UDID of the device. I got some apps in which they are getting device info like this.

I will be very helpful if I get any solution in this.

Thanks in advance.

2 Answers2

1

You can't as of iOS 6.

Link #1

Money quote:

As reported by 9to5Mac (and confirmed by Macworld), Apple alerted developers of a cut-off date for new apps or app updates that access an iOS device’s UDID (Universal Device ID), an area of security and privacy concern.

Link #2

Extended money quote:

With iOS 6 Apple has also completely eliminated its controversial Universal Device IDs (UDID) and replaced it with a more privacy-friendly way for application vendors and advertisers to identify specific devices, Hall said,

Apple’s UDIDs are basically a set of alphanumeric characters that are used to uniquely identify an iPhone or iPad. The numbers are designed to let application developers track how many users have downloaded their application and to gather other information for data analytics.

From the same article, the way to go now is:

With the new iOS 6 the company has gone one step further by eliminating UDIDs completely and replace with a set of three new devie identifiers. One is a vendor specific identifier that can be used by application vendors to recognize specific devices, another is designed for use by online advertisers and the third is an application-specific ID. Unlike UDID’s, the new identifiers are not persistent and can be cleared, though the device has to be completely reset to get rid of the advertiser identities, Hall said.

In conclusion, the correct way is to either (a) use UUID or (b) ask your user for the device's UDID.

  • Awesome answer!. Thanks. But I wonder how the apps in store getting the device UDID? Say for example UDID finder, Device Inspectors are the apps available in the store. They are getting device UDID. – Josechristy Martin Sep 03 '17 at 17:07
  • 1
    @JosechristyMartin Take a look at UDID Finder's last update, which was in 2010. As dfd stated, this functionality is not available with new apps or app updates. – Tamás Sengel Sep 03 '17 at 17:17
  • 2
    I honestly don't know. I did an online search and found a few websites out there too. One, easy-idid.com (sorry I will not provide the link), requires you to tether your device to the computer - an immediate flag for me. I checked the page source and found things like *"...is simple and based on Apple's enterprise deployement policies for iDevices...stated in the provisioning profile we use, and which contains Device enrollment challenge...Additionnally, to be installed, the profile needs user's acknowledgement."* Not only is this sketchy, it still requires the user's permission. –  Sep 03 '17 at 17:19
-4

You can use this (Swift 3):

UIDevice.current.identifierForVendor!.uuidString