Programmatically get device id Jul 5th, 2010 An easy way to get the unique identifier for your iPhone or iPad: 1 NSString *deviceId = [[UIDevice currentDevice] uniqueIdentifier]; Read more about it in the Apple docs.