Created
November 11, 2013 13:38
-
-
Save jiggak/7413301 to your computer and use it in GitHub Desktop.
print UUID to stdout
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
// xcrun gcc -framework Foundation -o uuid uuid.m | |
#import <Foundation/Foundation.h> | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
CFUUIDRef uuid = CFUUIDCreate(NULL); | |
CFStringRef str = CFUUIDCreateString(NULL, uuid); | |
CFRelease(uuid); | |
printf("%s\n", [(NSString*)str UTF8String]); | |
CFRelease(str); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment