I was wondering if it was possible to find out the UDID of the user\'s iPhone. Can someone shed some light?
In IOS5 and above, use this one to find UDID
NSString *uuidString = nil;
CFUUIDRef uuid = CFUUIDCreate(NULL);
if (uuid) {
uuidString = (__bridge NSString *)CFUUIDCreateString(NULL, uuid);
CFRelease(uuid);
}
NSLog(@"UDID: [%@]", uuidString);
Remember UDID is deprecated in IOS 5. In iOS 7, Apple now always returns a fixed value when querying the MAC to specifically thwart the MAC as base for an ID scheme. So you now really should use -[UIDevice identifierForVendor] or create a per-install UUID. Hope it will help for someone.
It's very simple. Go to Xcode Window and select Devices or you can find it in Organizer.
http://www.raywenderlich.com/2915/ios-code-signing-under-the-hood/organizerudid
In IOS5 and above, use this one to find UDID
NSString *uuidString = nil;
CFUUIDRef uuid = CFUUIDCreate(NULL); ...
I think you are showing how to generate a unique identification number, not to get the unique id of a device.