同一应用程序的不同设备之间的供应商 ID 唯一性?
Vendor ID uniqueness among different devices for same application?
我一直在使用 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."
这是objective C
中的代码
NSString *UDIDString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
NSLog(@"Vendor ID %@", UDIDString);
以下是我的查询
A) 我的名为“App_A”的应用程序的供应商 ID return 如果从 App Store 安装,不同设备的供应商 ID 是否相同?或者每个设备对于从 AppStore 安装的相同应用程序将具有不同的 vendorID?
B) 如果我用新版本更新应用程序,vendorID 是否有可能被更改?
欢迎任何意见。请帮忙解答一下
每个设备的唯一 ID。
不,Vendor ID 不会随着版本更新而改变。
编辑
来自 Apple 的文档 here:
The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
这似乎很清楚地回答了你的问题。
我一直在使用 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."
这是objective C
中的代码 NSString *UDIDString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
NSLog(@"Vendor ID %@", UDIDString);
以下是我的查询
A) 我的名为“App_A”的应用程序的供应商 ID return 如果从 App Store 安装,不同设备的供应商 ID 是否相同?或者每个设备对于从 AppStore 安装的相同应用程序将具有不同的 vendorID?
B) 如果我用新版本更新应用程序,vendorID 是否有可能被更改?
欢迎任何意见。请帮忙解答一下
每个设备的唯一 ID。
不,Vendor ID 不会随着版本更新而改变。
编辑
来自 Apple 的文档 here:
The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
这似乎很清楚地回答了你的问题。