Powered By Blogger

Tuesday, October 30, 2012

how to create UUID in iPhone?

Hi friends,
Here is the example for creating UUID in your iPhone/iPad/iPod Touch application.

            NSString *deviceUuid = nil;
            CFStringRef cfUuid = CFUUIDCreateString(NULL, CFUUIDCreate(NULL));
            deviceUuid = (NSString *)cfUuid;
            NSLog(@"deviceUuid : %@",deviceUuid);
            CFRelease(cfUuid);

Now , you can use this "deviceUuid" as UUID.

Thanks,
Nilesh M. Prajapati

No comments:

Post a Comment