我一直在使用identifierForVendor为我的应用程序创建唯一标识符。如以下文件所述:
它说
"The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.
Normally, the vendor is determined by data provided by the App Store. If the app was not installed from the app store (such as enterprise apps and apps still in development), then a vendor identifier is calculated based on the app’s bundle ID. The bundle ID is assumed to be in reverse-DNS format."这是目标C中的代码
NSString *UDIDString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
NSLog(@"Vendor ID %@", UDIDString);以下是我的疑问
如果从App安装不同的设备,我的应用程序名为"App_A“的供应商ID会返回相同的供应商ID吗?还是每个设备都有不同的vendorID,适用于从AppStore安装的相同的应用程序?
如果我用新版本更新应用程序,是否有可能更改vendorID?
如有任何投入,将不胜感激。请帮助进行查询
发布于 2020-08-25 10:57:19
编辑
从苹果的docs 这里
当应用程序(或来自同一供应商的另一个应用程序)安装在iOS设备上时,此属性中的值保持不变。当用户从设备中删除该供应商的所有应用程序并随后重新安装其中的一个或多个应用程序()时,值会发生变化。在使用Xcode 安装测试版本或在使用即席发行版的设备上安装应用程序时,该值也可能发生变化。因此,如果应用程序将此属性的值存储在任何地方,则应该优雅地处理标识符更改的情况。
这似乎很清楚地回答了你的问题。
https://stackoverflow.com/questions/63575503
复制相似问题