Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I retrieve the UDID on iOS?

I was wondering if it was possible to find out the UDID of the user's iPhone. Can someone shed some light?

like image 790
Oh Danny Boy Avatar asked Nov 24 '10 18:11

Oh Danny Boy


People also ask

What is UDID of iOS device?

A unique device identifier (UDID) is a 40-character string assigned to certain Apple devices including the iPhone, iPad, and iPod Touch. Each UDID character is a numeral or a letter of the alphabet. Using the UDID, third parties, particularly app vendors, can track subscriber behavior.


1 Answers

Note: Apple will no longer accept apps that access the UDID of a device starting May 1, 2013.

Instead, you must use the new methods identifierForVendor and advertisingIdentifier in iOS 6+ for accessing this. See related post here for more detail.


Old way (deprecated and will result in App Store rejection)

NSString *udid = [[UIDevice currentDevice] uniqueIdentifier]; 

As of iOS7, the uniqueIdentifier property is no longer available.

See the UIDevice reference.

like image 59
Jacob Relkin Avatar answered Sep 19 '22 05:09

Jacob Relkin