iOs上phonegap的唯一标识符 [英] Unique identifier for phonegap on iOs

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

问题描述

我需要在phonegap应用程序中识别用户。



在文档中,我找到了device.uuid( http://docs.phonegap.com/en/2.0.0/cordova_device_device.md.html#device.uuid ),但它只适用于Android。在iOs上,已弃用: https://developer.apple.com/news/ index.php?id = 3212013a#top



我在本地iOs代码中看到一些解决方案,它获取设备的MAC地址,但我需要phonegap解决方案。



谢谢!

解决方案

device.uuid 在iOS上返回identifierForVendor,因此我的插件不再需要了。



旧答案:
device.uuid ,但不是真正的UUID



来自phonegap doc


iOS Quirk



iOS上的uuid不是设备唯一的, $ b应用程序,用于每个安装。它更改如果你删除和
重新安装应用程序,可能还有当你升级iOS,甚至
升级你的应用程序的每个版本(显然在iOS 5.1)。 uuid不是一个
可靠的值。


我有一个 MAC地址phonegap插件,但我听说你无法获取MAC地址在iOS 7

我的插件不再工作,不可能在iOS 7上获取MAC地址



编辑:
BTW,我创建了供应商插件标识符
https://github.com/jcesarmobile/IDFVPlugin



使用此插件,您可以获取iOS 供应商的标识符


I need to identify user in phonegap application.

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. On iOs it's deprecated: 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.

Thanks!

解决方案

Now device.uuid returns the identifierForVendor on iOS, so my plugin is not needed anymore.

Old Answer: You can still use the device.uuid, but it isn't a real UUID

from phonegap doc

iOS Quirk

The uuid on iOS is not unique to a device, but varies for each application, for each installation. 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). The uuid is not a reliable value.

I have a MAC address phonegap plugin, but I've heard you can't get the MAC address on iOS 7

My plugin no longer works, it's not possible to get the MAC address on iOS 7

EDIT: BTW, I created an Identifier For Vendor Plugin https://github.com/jcesarmobile/IDFVPlugin

With this plugin you can get the iOS identifier for vendor

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

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