So apple is rejecting apps which uses UDID. There are lots of posts on this, but i can't find where is written is it's good to use OpenUDID.
So maybe someone know if apple will approve this ? If OpenUDID has all features as UDID ?
Maybe someone is using this approach and could explain more ?
Seems like the easiest solution is to just generate your own UUID:
NSString *UUID() {
CFUUIDRef cfuuid = CFUUIDCreate(NULL);
NSString *uuid = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, cfuuid);
CFRelease(cfuuid);
return uuid;
}
If you need to keep this across uninstall/install cycles, put it in the keychain as described here: https://stackoverflow.com/a/11597291/382374
Best thing, this is how Apple suggests you do it.
Good luck!
We create our own UDIDs based on a hash of the device MAC address and the bundle identifier. This ensures that we can uniquely identify our app on a specific device.
You could also create a hash based only on the MAC address if you need a unique ID across multiple apps.
I've actually written a blog post about how to do this and provided some sample code here:
https://radeeccles.com/blog/create-your-own-unique-device-identifier-udid
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