使用离子框架在 iphone 中获取唯一设备 ID

Getting Unique device Id in iphone using ionic framework

和我搜索的一样。但是,我没有得到适当的解决方案,因为 Apple 已弃用 iPhone 中的这个唯一 ID 6 onwards.so 如何在 ionic 中获取 iPhone 的唯一 ID,它将在重新安装应用程序。

无法获得唯一的设备 ID。

您可以自己生成然后存储在设备中。

或者您可以使用UIDevice.currentDevice().identifierForVendor!.UUIDString,即:

An alphanumeric string that uniquely identifies a device to the app’s vendor.

使用 KeyChain 可以在重新安装过程中保留此 ID。参见 this topic

您现在可以为识别目的做的最好的事情是使用 UUID( 通用唯一标识符)使用 $cordovaDevice.

此外还有few methods to fetch unique identifiers.