In our application in any one part we need iOS device UDID, Name, Version, Model, System Name for app security or something.
I hope we all are know about to get these items by programmatically. But, in iOS 6.0 I tried to get UDID by using UIDevice but, it is deprecated.
In iOS 6 we have to use NSUUID instead of UIDevice.
In iOS 5 and below:
UIDevice *myDevice = [UIDevice currentDevice];
NSString *deviceUDID = myDevice.uniqueIdentifier;
NSString *deviceName = myDevice.Name;
NSString *deviceSystemName = myDevice.systemName;
NSString *deviceOSVersion = myDevice.systemVersion;
NSString *deviceModel = myDevice.model;
In iOS 6 to get UDID:
NSUUID *myDevice = [NSUUID UUID];
NSString *deviceUDID = myDevice.UUIDString;
I hope it will help someone. I welcome your comments and ideas on this post. Thanks.