如何使用xcode以编程方式获取设备IMEI号码到phonegap? [英] How to get device IMEI number programmatically using xcode to phonegap?

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

问题描述

我想获取设备imei号并将其发送到phonegap html页面.我们该怎么办?

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

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

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

同样的,我们在iOS中会怎么做呢?

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

推荐答案

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

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.

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

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

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

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