新版本的设备ID正在更改

时间:2018-09-19 12:37:35

标签: ios objective-c xcode

我的应用已经在应用商店中。我要上传新版本。在新版本中,设备ID(identifierForVendor)被更改。如果我们删除并重新安装旧应用程序(Appstore),则工作正常。但是,如果仅更新新版本,我们将获得设备ID更改。
有人可以帮助解决此关键问题。

我们正在使用以下代码获取设备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];
}

}

0 个答案:

没有答案