美文网首页
iOS 生成UUID

iOS 生成UUID

作者: Bager | 来源:发表于2017-05-18 09:52 被阅读2382次
    + (NSString *)uuidString
    {
        CFUUIDRef uuid_ref = CFUUIDCreate(NULL);
        CFStringRef uuid_string_ref= CFUUIDCreateString(NULL, uuid_ref);
        NSString *uuid = [NSString stringWithString:(__bridge NSString *)uuid_string_ref];
        CFRelease(uuid_ref);
        CFRelease(uuid_string_ref);
        return [uuid lowercaseString];
    }
    

    相关文章

      网友评论

          本文标题:iOS 生成UUID

          本文链接:https://www.haomeiwen.com/subject/xztsxxtx.html