本文介绍了如何以编程方式使用xcode到phonegap获取设备IMEI号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取设备imei号码,并将其发送到phonegap html页面。我们应该如何做?



在phonegap android中,我们将从java文件获取imei数,并将其发送到javascript文件。



同样的方式,我们将如何在iOS中做?

解决方案

如rckoenes所述,您无法获得IMEI。此外,您不能获取任何可以链接到物理设备(UDID,MAC地址)的ID。但是,如果您需要获取一个在用户使用您的应用时保持不变的唯一标识符,则可以使用 [UIDevice identifierForVendor] 属性。



请注意,您不能将此标识符用于广告目的,请改用 [ASIdentifierManager advertisingIdentifier] 属性(遵循AdSupport指南)。


I would like to getting the device imei number and send it to the phonegap html page. How should we do?

In phonegap android we will get the imei number from java file and send it into javascript file.

The same way, how we will do in the iOS?

解决方案

As rckoenes mentioned, you cannot get the IMEI. Also you cannot get any ID that can link to the physical device (UDID, MAC address). However, if you need to get a unique identifier that will remain constant whenever the user uses your app, you can use the [UIDevice identifierForVendor] property.

Note you cannot use this identifier for advertising purposes, use the [ASIdentifierManager advertisingIdentifier] property instead (following the guidelines for AdSupport).

这篇关于如何以编程方式使用xcode到phonegap获取设备IMEI号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 01:49