UIDevice *device = [UIDevice currentDevice];//创建设备对象 NSString *deviceUID = [[NSString alloc] initWithString:[device uniqueIdentifier]]; UIAlertView *view = [[UIAlertView alloc]initWithTitle:nil message:deviceUID delegate:self cancelButtonTitle:@"ok" otherButtonTitles: nil]; [view show];