[英]Unique identifier for phonegap on iOs
I need to identify user in phonegap application. 我需要在phonegap应用程序中识别用户。
In documentation I found device.uuid ( http://docs.phonegap.com/en/2.0.0/cordova_device_device.md.html#device.uuid ), but it works only on Android. 在文档中我找到了device.uuid( http://docs.phonegap.com/en/2.0.0/cordova_device_device.md.html#device.uuid ),但它仅适用于Android。 On iOs it's deprecated: https://developer.apple.com/news/index.php?id=3212013a#top .
在iOs上它被弃用: https : //developer.apple.com/news/index.php? id = 3212013a#top。
I saw some solutions in native iOs code, that gets MAC address of device, but I need phonegap solution. 我在本机iOs代码中看到了一些解决方案,它获取了设备的MAC地址,但我需要phonegap解决方案。
Thanks! 谢谢!
Now device.uuid
returns the identifierForVendor on iOS, so my plugin is not needed anymore. 现在,
device.uuid
在iOS上返回identifierForVendor,因此不再需要我的插件。
Old Answer: You can still use the device.uuid
, but it isn't a real UUID 旧答案:您仍然可以使用
device.uuid
,但它不是真正的UUID
from phonegap doc 来自phonegap doc
iOS Quirk
iOS Quirk
The uuid on iOS is not unique to a device, but varies for each application, for each installation.
iOS上的uuid并非设备唯一,但对于每个安装,每个应用程序都有所不同。 It changes if you delete and re-install the app, and possibly also when you upgrade iOS, or even upgrade your app per version (apparent in iOS 5.1).
如果您删除并重新安装应用程序,并且可能还在升级iOS时,甚至每个版本升级您的应用程序(在iOS 5.1中显而易见),它都会更改。 The uuid is not a reliable value.
uuid不是一个可靠的价值。
I have a MAC address phonegap plugin , but I've heard you can't get the MAC address on iOS 7 我有一个MAC地址phonegap插件 ,但我听说你无法在iOS 7上获得MAC地址
My plugin no longer works, it's not possible to get the MAC address on iOS 7 我的插件不再有效,无法在iOS 7上获取MAC地址
EDIT: BTW, I created an Identifier For Vendor Plugin https://github.com/jcesarmobile/IDFVPlugin 编辑:BTW,我为供应商插件创建了一个标识符https://github.com/jcesarmobile/IDFVPlugin
With this plugin you can get the iOS identifier for vendor 使用此插件,您可以获得供应商的iOS 标识符
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.