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

19.4k views Asked by At

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?

2

There are 2 answers

3
rckoenes On

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.

0
dirkgroten On

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