]> git.saurik.com Git - uikittools.git/commitdiff
Added uiduid.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 29 Aug 2008 22:12:48 +0000 (22:12 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 29 Aug 2008 22:12:48 +0000 (22:12 +0000)
makefile
uiduid.mm [new file with mode: 0644]

index 740b6662b02b57071f11fadc33a4ac240fb17a65..cf9cbd010e3f0307b415d7dd50df9b067b597637 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-all: uishoot
+all: uiduid uishoot
 
 %: %.mm
        $${PKG_TARG}-g++ -o $@ $< -framework CoreFoundation -framework Foundation -framework UIKit -lobjc
diff --git a/uiduid.mm b/uiduid.mm
new file mode 100644 (file)
index 0000000..f9580f0
--- /dev/null
+++ b/uiduid.mm
@@ -0,0 +1,12 @@
+#import <Foundation/Foundation.h>
+#import <UIKit/UIDevice.h>
+#include <cstdio>
+
+int main(int argc, char *argv[]) {
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+    printf("%s\n", [[UIDevice uniqueIdentifier] UTF8String];
+
+    [pool release];
+    return 0;
+}