Created
July 10, 2012 01:52
-
-
Save theiostream/3080494 to your computer and use it in GitHub Desktop.
Get UDID from liblockdown
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
## Uses theos. | |
include theos/makefiles/common.mk | |
TOOL_NAME = uiduid2 | |
uiduid2_FILES = main.mm | |
uiduid2_LDFLAGS = -llockdown | |
include $(THEOS_MAKE_PATH)/tool.mk |
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
#import <Foundation/Foundation.h> | |
#import <CoreFoundation/CoreFoundation.h> | |
#import <liblockdown.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
// FIXME: Do we need a NSAutoreleasePool here? | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
LockdownConnectionRef connection = lockdown_connect(); | |
CFStringRef udid = (CFStringRef)lockdown_copy_value(connection, NULL, kLockdownUniqueDeviceIDKey); | |
CFShow(udid); | |
lockdown_disconnect(connection); | |
[pool drain]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment