What to do with apps running on iOS 5 and below for identifierForVender

I have heard over the last couple of days that Apple are making it so that apps that use the UDID identifier of the device that they are running on will be rejected from the Apple App store (Here is where I have read this). They advise developers to use the identifierForVender which was introduced in iOS 6. I don’t have an issue with this easy to change over, but what do I use if I still want to support devices running on an iOS below iOS6? Can I still use the UDID identifier or not? I don’t believe this is very clear.

  • iphone how to send my project build to someone else
  • Has anyone had their iOS App rejected by Apple for using the devices UDID?
  • Using UDID to create unique user identity
  • Differences between UDID and UUID
  • iPhone/iPad unique identifier BESIDES UUID/UDID?
  • How to detect if any external libraries are calling uniqueIdentifier]?
  • Solutions Collect From Internet About “What to do with apps running on iOS 5 and below for identifierForVender”

    Your app will be rejected if you continue to use uniqueIdentifier independently of the iOS version. I recommend using OpenUDID instead, which is a drop-in replacement for the deprecated uniqueIdentifier.

    You could check whether identifierForVendor is available, or you can use OpenUDID in all cases.

    if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {
        // Use: [[[UIDevice currentDevice] identifierForVendor] UUIDString];
    } else {
        // Use: [OpenUDID value];
    }