Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unique Identification of iOS device for iOS 7.0 and above

Looking for your help

I am facing a problem while getting Device Identifier. Actually I am using a UIDevice+IdentifierAddition.h, NSString+MD5Addition.h classes to get Identifier, but its return same identifier for all my devices i.e. iPhone 4s (iOS 7.1) & iPhone 5 (iOS 7.1.1).

Can any one have any solution for this problem. because I want a something unique for device specific. its my app requirement.

Important: I want to submit this app on app store, So please, answer must be as per the guidelines

like image 920
Karamjeet Singh Avatar asked Jul 15 '14 08:07

Karamjeet Singh


People also ask

How do I find the UDID on my iPhone 7?

Select your iOS device by clicking the device's image located at the upper-left corner of iTunes's UI. On the next screen, a window should appear listing your phone's Capacity, Phone Number, and Serial Number. By clicking on Serial Number once, the prompt should change to display your UDID.

What is iOS device ID?

Apple device IDs Every Apple iPhone, iPod touch and iPad has a unique device ID number associated with it, known as a Unique Device ID (UDID). Apple's device ID is a 40-digit sequence of letters and numbers. Customers can access their device ID numbers in iTunes or by downloading a free app from the Apple App Store.


2 Answers

Since iOS 7 it is no longer possible to get any unique device identifiers.

Your options are:

  • create your own unique ID and save it in the keychain.
  • use the vendor ID, which will be reset if all the app by the same vendor are removed from the device.
like image 52
rckoenes Avatar answered Sep 20 '22 06:09

rckoenes


Now it's possible in iOS 11.0+, Apple has introduced a new API called DeviceCheck API with which developers can uniquely identify a device.

As mentioned in the documentation:

Using the DeviceCheck APIs, in combination with server-to-server APIs, you can set and query two bits of data per device, while maintaining user privacy. You might use this data to identify devices that have already taken advantage of a promotional offer that you provide, or to flag a device that you have determined to be fraudulent. The DeviceCheck APIs also let you verify that the token you receive comes from an authentic Apple device that includes your app.

Also, check out the following WWDC17 video starting at 24 min: https://developer.apple.com/videos/play/wwdc2017/702/


EDIT:

A thoroughly detailed tutorial on this Device Check topic can be found here.

like image 45
Muhammad Umair Avatar answered Sep 21 '22 06:09

Muhammad Umair