Home > iPhone SDK > Objective C Get iPhone Device GUID

Objective C Get iPhone Device GUID

Following Xcode reveals you the device id

UIDevice *device = [UIDevice currentDevice];
NSString *uniqueIdentifier = [device uniqueIdentifier];
/*[device release];*/
NSLog(@”Device GUID: %@”, uniqueIdentifier);

Bookmark and Share
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • LinkedIn
  • Live
  • MySpace
  • Tumblr
  • TwitThis
  • Yahoo! Buzz
  • StumbleUpon
  • Technorati
Categories: iPhone SDK Tags: , , ,
  1. December 2nd, 2009 at 13:58 | #1
  2. Dylan Barrie
    December 2nd, 2009 at 14:41 | #2

    This code is fundamentally flawed. The UIDevice retrieved via +[UIDevice currentDevice] is not initialized, retained, or copied by the calling function, nor does ‘currentDevice’ have the words ‘init’ or ‘copy’ in it. The returned device MUST NOT be released, since it was not retained, initialized, or copied.

    UIDevice *device = [UIDevice currentDevice];
    NSString *uniqueIdentifier = [device uniqueIdentifier];

    is correct.

  1. No trackbacks yet.