iOS 唯一標示符 卸載後安裝值不變

Vindor標示符 (IDFV-identifierForVendor)
這種叫法也是在iOS 6中新增的,不過獲取這個IDFV的新方法被添加在已有的UIDevice類中。跟advertisingIdentifier一樣,該方法返回的是一個NSUUID對象。

NSString *idfv = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

 

蘋果官方的文檔中對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.

 

如果滿足這樣的條件,那麼獲取到的這個屬性值就不會變:相同的一個程序裏面-相同的vindor-相同的設備。如果是這樣的情況,那麼這個值是不會相同的:相同的程序-相同的設備-不同的vindor,或者是相同的程序-不同的設備-無論是否相同的vindor。

 

vendor非常簡單:一個Vendor是CFBundleIdentifier(反轉DNS格式)的前兩部分。例如,com.doubleencore.app1 和 com.doubleencore.app2 得到的identifierForVendor是相同的,因爲它們的CFBundleIdentifier 前兩部分是相同的。不過這樣獲得的identifierForVendor則完全不同:com.massivelyoverrated 或 net.doubleencore。

 

PS:卸載後安裝值不變

示例: 599F9C00-92DC-4B5C-9464-7971F01F8370


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章