3

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.

4

1 に答える 1

6

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];
}
于 2013-03-25T13:11:56.643 に答える