Please suggest that if we have passed an random number as device UDID on web server. Then the app will be approved by App Store or not.
They will not reject it for use of a random number, it is the unique identification of specific devices they are concerned about.
I do suggest you look into identifierForVendor
and advertisingIdentifier
as replacements for uniqueIdentifier
.
If you need to support older iOS versions, you can build against a modern SDK, set your deployment version to the oldest version you support and check for the existence of these methods like so:
if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)])
{
// Use the method here
}
else
{
// Do something different for older iOS versions.
}