Objective c 中获取GUID

+ (NSString*) stringWithUUID

{

CFUUIDRefuuidObj = CFUUIDCreate(nil);//create a new UUID

//get the string representation of the UUID

NSString*uuidString = (NSString*)CFUUIDCreateString(nil, uuidObj);

CFRelease(uuidObj);

return [uuidString autorelease];

}