How to get a UUID in objective c, like in Java UUID is used to generate unique random numbers which represents 128 bit value.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try:
UPDATE:
As of iOS 6, there is an easier way to generate UUID. And as usual, there are multiple ways to do it:
Create a UUID string:
Create a UUID:
Creates an object of type
NSConcreteUUIDand can be easily casted toNSString, and looks like this:BE5BA3D0-971C-4418-9ECF-E2D1ABCB66BENOTE from the Documentation: