0

I had my app already in app store. I want to upload the new version. With the new version, the device ID (identifierForVendor) gets changed. If we delete and reinstall the Old App(Appstore) it is working fine. But if we update the new version only we are getting the device ID Change.
Can someone help to fix this critical issue.

We are using the following Code to get the device ID

+(id)getUDIDNumber
{
 static NSString *vendorIdentifier = nil;

if (SYSTEM_VERSION_LESS_THAN(@"6.0"))
{
    // code here
    vendorIdentifier = [UIDevice uniqueDeviceIdentifier];
}
else if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0"))
{
    // code here
    id vendorIdObject = [[UIDevice currentDevice] identifierForVendor];

    vendorIdentifier = [vendorIdObject UUIDString];
}

}
Gokulnath
  • 235
  • 2
  • 13
  • Possible duplicate of [UniqueIdentifier in ios 7](https://stackoverflow.com/questions/19995698/uniqueidentifier-in-ios-7) – El Tomato Sep 19 '18 at 12:47
  • Of course if you have started using `identifierForVendor` instead of `uniqueDeviceIdentifier` it will be different. Revert changes and upload new build, that use `uniqueDeviceIdentifier` again. – Cy-4AH Sep 19 '18 at 13:01
  • @Cy-4AH, `uniqueDeviceIdentifier` was deprecated about 5-6 years ago... the app will be rejected if uses `uniqueDeviceIdentifier` or try to extract that value. – holex Sep 19 '18 at 14:25
  • Yours application have deployment target lower then ios 6? – Cy-4AH Sep 19 '18 at 14:45
  • We had updated the app in August 2017. With new version, there is no code changes. Only a few enhancements were done and we are trying to upload. It was working fine with appstore version. There are no code Differences. Deployment target is 9.0. The code is written 5 years back. So we don't want to disturb the code. – Gokulnath Sep 20 '18 at 05:47

0 Answers0