IOS生成UUID
/** * 生成GUID */ + (NSString *)generateUuidString{ // create a new UUID which you own CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); // create a new CFStringRef (toll-free bridged to NSString) // that you own NSString *uuidString = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); // transfer ownership of the string // to the autorelease pool [uuidString autorelease]; // release the UUID CFRelease(uuid); return uuidString; } @end