Created
April 9, 2013 09:23
-
-
Save maxhuk/5344306 to your computer and use it in GitHub Desktop.
UUID string generator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UUID.h | |
// | |
// Created by Maksym Huk on 3/20/13. | |
// Copyright (c) 2013 Maksym Huk. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
extern NSString *GenerateUUID(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UUID.h | |
// | |
// Created by Maksym Huk on 3/20/13. | |
// Copyright (c) 2013 Maksym Huk. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
NSString *GenerateUUID() | |
{ | |
CFUUIDRef newUniqueId = CFUUIDCreate(kCFAllocatorDefault); | |
NSString * uuidString = (__bridge_transfer NSString*)CFUUIDCreateString(kCFAllocatorDefault, newUniqueId); | |
CFRelease(newUniqueId); | |
return uuidString; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment