Saturday 21 May 2011

(For Iphone developers) How to get UDID of iphone???

Available Properties in UIDevice

  • uniqueIdentifier – identifier guaranteed to be unique for every device
  • name – arbitrary name found in General > About setting on device
  • systemName – name of the OS running on the device
  • systemVersion – current version of the OS
  • model- model, such as ”iPhone” or ”iPod touch”
  • localizedModel – same as above using a localized string


Stats for Simulator

This code will list all stats shown above:

NSLog(@"uniqueIdentifier: %@"
[[UIDevice currentDevice] uniqueIdentifier]);
NSLog(@"name: %@"
[[UIDevice currentDevice] name]);
NSLog(@"systemName: %@",  
[[UIDevice currentDevice] systemName]);
NSLog(@"systemVersion: %@"
[[UIDevice currentDevice] systemVersion]);
NSLog(@"model: %@"
[[UIDevice currentDevice] model]);
NSLog(@"localizedModel: %@",
[[UIDevice currentDevice] localizedModel]);

Running the above on the simulator returns:



Stats for iPhone

The device stats when running on iPhone:

1 comment:

Anonymous said...

Hey there! I could have sworn I've been to this website before but after reading through
some of the post I realized it's new to me. Nonetheless, I'm
definitely delighted I found it and I'll be book-marking
and checking back frequently!

My homepage ... www.downloadicus.com