Javascript Phonegap和Angularjs-iOS唯一标识符

Javascript Phonegap和Angularjs-iOS唯一标识符,javascript,angularjs,cordova,identifier,Javascript,Angularjs,Cordova,Identifier,我正在开发一个Angularjs+phonegap应用程序,我需要的是为所有应用程序用户获取唯一标识符 我想从设备上获取电话号码,但看起来不可能,不是吗 如果无法获得电话号码,您还有其他想法吗 浏览器或设备是否有我可以通过javascript/angularjs获得的唯一标识符?您可以使用,它将返回一个唯一的字符串。此字符串的生成方式因设备制造商而异: // Android: Returns a random 64-bit integer (as a string, again!) //

我正在开发一个Angularjs+phonegap应用程序,我需要的是为所有应用程序用户获取唯一标识符

我想从设备上获取电话号码,但看起来不可能,不是吗

如果无法获得电话号码,您还有其他想法吗

浏览器或设备是否有我可以通过javascript/angularjs获得的唯一标识符?

您可以使用,它将返回一个唯一的字符串。此字符串的生成方式因设备制造商而异:

// Android: Returns a random 64-bit integer (as a string, again!)
//          The integer is generated on the device's first boot
//
// BlackBerry: Returns the PIN number of the device
//             This is a nine-digit unique integer (as a string, though!)
//
// iPhone: (Paraphrased from the UIDevice Class documentation)
//         Returns a string of hash values created from multiple hardware identifies.
//         It is guaranteed to be unique for every device and cannot be tied
//         to the user account.
//
// Windows Phone 7 : Returns a hash of device+current user,
// if the user is not defined, a guid is generated and will persist until the app is uninstalled
//
// Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
// unique to every GSM and UMTS mobile phone.

…但足以识别应用程序实例的唯一性。

您能使用吗?@admdraw看起来不错,您知道我是否可以毫无问题地将其存储在数据库中吗?我的意思是不分享它重要吗?我不确定,我自己没有用过,我只是为了找到它。我注意到有人提到它是为每个应用程序/每个安装生成的(而不是为设备本身生成一个
uuid
。@admdraw ah ok great:)谢谢你的提示,如果我无法获得任何标识符,我将使用一些加密库I生成一个唯一的哈希guess@admdrew是的,谢谢你给我一个答案,所以我接受了;)有趣的是,Tizen OS将返回设备的IMEI。