I'm confused on what should I use to uniquely identify my users?
I want to support iOS7 too but i dont understand the differences.
I'm currently using this snippet to generate a UUID:
CFUUIDRef udid = CFUUIDCreate(NULL);
NSString* createdUUID = (NSString *) CFUUIDCreateString(NULL, udid);
[createdUUID autorelease];
CFRelease(udid);
identifierForVendor
a unique identifier shared by all your apps on the user's device. If the user has more than one app made by you they will all share this identifier. This identifier will be reset if the user deletes all the apps by the same vendor.advertisingIdentifier
unique identifier that can be used to track use for advertising purposes. Can be reset by the the user.CFUUID
just a class that creates an UUID every time you call it.The code you posted will create a new unique identifier every time it is called. You should store this identifier in NSUSerDefaults
or Keychain and read it from there to build some kind of user tracking.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With