How to create Unique Identifier and save it to identify user(device)

253 Views Asked by At

I want to create unique identifier on iOS 5 and use it for identifying user (user device) every time app is started. I am able to create a unique identifier by following code

 CFUUIDRef theUUID = CFUUIDCreate(NULL);
 CFStringRef string = CFUUIDCreateString(NULL, theUUID);
 CFRelease(theUUID);

But unable to save it on user device so that particular identifier is not deleted even when app is uninstalled. I tried using SSKeychain approach but it gives Apple Mach-o Linker error.

Please let me know the the way I can accomplish the same.

Any help is appreciated.

1

There are 1 best solutions below

0
On

I had exactly the same problem after adding SSKeyChain to my project following the author's instructions online. I eventually discovered that the implementation file was not included in my list of source files in build phases. To rectify the issue do the following:

1) Select your project, then its target. 2) Then select the Build Phases tab 3) On the Build Phases tab you will see a group called Compile Sources, expand it to view contents 4) Check to see if SSKeyChain is in the list 5) If not (as in my case) click the little plus sign at the bottom of the group and navigate to where you added SSKeyChain.m and add it.

Build your project and the error should have disappeared... I hope this helps!