Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Device UDID in programmatically in iOS7?

Tags:

iphone

udid

How to get device UDID in programatically in iOS7.[[UIDevice currentDevice] uniqueIdentifier] I was used this code This is deprecated iOS7. how to get the device UDID. The UDID String changing when I delete the app and the reinstall means the UDID was getting different one.

like image 602
iSara Avatar asked Jan 06 '14 07:01

iSara


People also ask

How do I find my UDID code?

Connect your device to the computer using a USB cable. Open iTunes. Click the device icon to the right of Apps drop-down menu in iTunes. Click the serial number value until you see the UDID value being displayed.

How do I find my UDID 2022 iPhone?

Plug your iPhone into your Mac using the USB cable. Open Finder and select your iPhone in the sidebar. Click on the text with the iPhone model, drive capacity, and battery information, and it will change to show the serial number, UDID, and model.

Is device ID and UDID same?

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.


1 Answers

It's work 100% to all the version

other best option recommend by apple use ASIdentifierManager Class Reference

ios7-app-backward-compatible-with-ios5-regarding-unique-identifier

this link tell you how to handle and use custom framework

uidevice-uniqueidentifier-property-is-deprecated-what-now

iOS 9

NSUUID *uuid = [[NSUUID alloc]initWithUUIDString:@"20B0DDE7-6087-4607-842A-E97C72E4D522"]; NSLog(@"%@",uuid); NSLog(@"%@",[uuid UUIDString]); 

or

it support only ios 6.0 and above

code to use [[[UIDevice currentDevice] identifierForVendor] UUIDString];

NSUUID *deviceId; #if TARGET_IPHONE_SIMULATOR deviceId = [NSUUID initWithUUIDString:@"UUID-STRING-VALUE"]; #else deviceId = [UIDevice currentDevice].identifierForVendor; #endif 

ios 5 to use like

 if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {     // This is will run if it is iOS6     return [[[UIDevice currentDevice] identifierForVendor] UUIDString]; } else {    // This is will run before iOS6 and you can use openUDID or other     // method to generate an identifier } 
like image 145
codercat Avatar answered Sep 18 '22 08:09

codercat