My problem is i want to generate random unique identifier this should not be same for two devices which run my same app. And in same device it should not produce repetitive identifier.So what i want is device specific number + unique identifier (so that i can easily identify certain user with device on server). Currently i am using the following code. But it is very lengthy .i want the identifier restricted to 8 charaters.
+ (NSString *)uuid
{
CFUUIDRef uuidRef = CFUUIDCreate(NULL);
CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
CFRelease(uuidRef);
return (__bridge_transfer NSString *)uuidStringRef;
}
9FCAFBEC-04CA-4F78-B417-BB051EEC9888