How to Find Your iPhone and iPad's UUID. Connect your iPhone or iPad to your computer, and then open iTunes. Click the device icon at the top. Your device's UUID is hidden by default—click “Serial Number” and it will change to display your UUID.
To Generate a GUID in Windows 10 with PowerShell, Type or copy-paste the following command: [guid]::NewGuid() . This will produce a new GUID in the output. Alternatively, you can run the command '{'+[guid]::NewGuid(). ToString()+'}' to get a new GUID in the traditional Registry format.
A universally unique value to identify types, interfaces, and other items.
Each iOS device has a UDID, or a Unique Device Identifier – a sequence of 40 characters that are unique to each individual device.
[[UIDevice currentDevice] uniqueIdentifier]
Returns the Unique ID of your iPhone.
EDIT:
-[UIDevice uniqueIdentifier]
is now deprecated and apps are being rejected from the App Store for using it. The method below is now the preferred approach.
If you need to create several UUID, just use this method (with ARC):
+ (NSString *)GetUUID
{
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
CFRelease(theUUID);
return (__bridge NSString *)string;
}
EDIT: Jan, 29 2014: If you're targeting iOS 6 or later, you can now use the much simpler method:
NSString *UUID = [[NSUUID UUID] UUIDString];
Here is the simple code I am using, compliant with ARC.
+(NSString *)getUUID
{
CFUUIDRef newUniqueId = CFUUIDCreate(kCFAllocatorDefault);
NSString * uuidString = (__bridge_transfer NSString*)CFUUIDCreateString(kCFAllocatorDefault, newUniqueId);
CFRelease(newUniqueId);
return uuidString;
}
In iOS 6 you can easily use:
NSUUID *UUID = [NSUUID UUID];
NSString* stringUUID = [UUID UUIDString];
More details in Apple's Documentations
Reviewing the Apple Developer documentation I found the CFUUID object is available on the iPhone OS 2.0 and later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With