iOS设备的唯一标识 [英] Unique Identification of iOS device

查看:217
本文介绍了iOS设备的唯一标识的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Mac地址来识别iOS设备的唯一标识,但是从iOS7系统始终返回02:00:00:00:00:00的值。我已经搜索了上述问题的三个选项:

I was using Mac address for unique identification of the iOS device, but from iOS7 the system always returns 02:00:00:00:00:00 value. I had searched three options for the mentioned issue:


  1. 供应商识别

  2. 广告标识

  3. 使用IOUnit框架获取序列号

由于IOUnitFramework未经appstore批准,因此无法在我的应用程序。并且供应商标识和广告标识返回非常长的值。

Since the IOUnitFramework is not approved by appstore, cant use it in my application. And the vendor identification and advertising identification return very long values.

是否有其他可能的方法来唯一标识ios设备?

Is there any other possible way to uniquely identify the ios device?

提前致谢

在钥匙串中存储唯一标识符是另一种选择。但是我们无法直接从我们的ios设备访问钥匙串。那么有没有其他方法可以对设备进行唯一识别?

Storing a unique identifier in keychain is another option. But we can't access the keychain directly from our ios device.So is there any other alternative way for unique identification of the device?

推荐答案

不,Apple不允许您再次识别设备。这与用户隐私有关。由于您不识别用户而是识别设备

No, Apple does not allow you to uniquely identify devices any more. This has to do with the user privacy. Since you are not identifying the user but a device.

也不要使用 ASIdentifierManager 用于识别设备,Apple现在拒绝使用它来识别设备的应用程序。 ASIdentifierManager 仅用于广告目的。

Also don't use the ASIdentifierManager for identifying device, Apple is now reject apps that use this to identify device. The ASIdentifierManager is only to be used for advertisement purposes.

剩下的唯一选择是 [[UIDevice currentDevice] identifierForVendor] 或将您自己的自定义创建ID保存到钥匙串。
保存到您自己创建钥匙串的ID将确保如果用户删除该应用程序并在以后重新安装它,您仍然可以访问该值。

The only option left is either the the [[UIDevice currentDevice] identifierForVendor] or save your own custom create ID to the keychain. Saving to your own create id to the keychain will make sure that if the user deletes the app en reinstalls it later you can still access this value.

这篇关于iOS设备的唯一标识的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆