代号一 - 从 iOS 台设备获取 IMEI

Codename One - Get IMEI from iOS device

我需要知道 iOS 设备的 IMEI 号码,运行 我的代号 One 应用程序。

正在阅读,好像不行。是不是仍然无法获取 IMEI 号码?关于序列号?有任何解决方法建议吗?

一般来说,iOS 不会让您获得持久的唯一标识符(IMEI、UDID、Wi-Fi MAC 地址等)(source ).

developer guide of Codename One中写着:

Don’t use an app to get the UDID! Most return the wrong value, the official way to get the UDID is thru itunes.

如果您需要唯一标识设备,最好的方法是使用代号一方法Log.getUniqueDeviceId()

根据its Javadoc

Returns a server generated unique device id that is cached locally and is only valid per application. Notice that this device id is specific to your application and to a specific install, it is guaranteed to be completely unique or -1 if unavailable (which can be due to a network error). Warning: this method might block while accessing the server!