Usted puede utilizar el código siguiente
if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {
// This will run if it is iOS6 or higher
return [[[UIDevice currentDevice] identifierForVendor] UUIDString];
} else {
// This will run before iOS6 and you can use openUDID or other
// method to generate an identifier
}
Y de esta manera se puede mantener el requisito anterior min.
Este identificador es exclusivo para todas las aplicaciones de un solo proveedor. Si quieres identificador único de dispositivo es necesario utilizar:
if (!NSClassFromString(@"ASIdentifierManager")) {
// This will run before iOS6 and you can use openUDID, per example...
return [OpenUDID value];
}
return [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
Advertencia: Hay un fallo en iOS 6 que informa identificador "nulo" si el dispositivo se actualiza "por el aire" - More info
posible duplicado de [UIDevice uniqueIdentifier Deprecated - ¿Qué hacer ahora?] (Http://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now) –