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

Lavanya picture Lavanya · Jan 3, 2014 · Viewed 18.7k times · Source

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?

Answer

dirkgroten picture dirkgroten · Jan 3, 2014

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