How to get device IMEI number programmatically using xcode to phonegap?

会有一股神秘感。 提交于 2019-12-17 21:11:21

问题


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?


回答1:


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).




回答2:


You can't, Apple does not allow you to identify devices any more. UDID and mac address solutions have all been disallowed since iOS 7.

Any solution you can find on getting the IMEI number on iOS require the use of a private library and you app will be rejected from using this.



来源:https://stackoverflow.com/questions/20902222/how-to-get-device-imei-number-programmatically-using-xcode-to-phonegap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!