iPhone/iPad unique identifier BESIDES UUID/UDID?

后端 未结 6 2056
醉话见心
醉话见心 2020-12-14 04:08

The project I am on is requesting two (or even three) unique identifiers from the iPhone or iPad. I know, I know... the UDID should be enough but we are trying to see if th

6条回答
  •  臣服心动
    2020-12-14 04:39

    From Apple:

    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.

    So if you use [UIDevice identifierForVendor] and the user delete the app and reinstall it, the id will be different(so no real physical device tracking)

    Why don't you use SecureUDID?

    NSString *domain = @"com.example.app";
    NSString *key = @"mykey";
    NSString *udid = [SecureUDID UDIDForDomain:domain usingKey:key];
    

    This way, even if the user delete the app and reinstall it, the UDID will be same. This will give you consistent tracking(or whatever you want to do with the UDID). Btw, the above is still permitted from Apple. Have fun.

提交回复
热议问题