正在获取“找不到设备<iOS模拟器ID>!”运行ideviceinfo命令后出现错误消息

时间:2020-05-13 18:37:45

标签: ios simulator

  • Xcode版本11.3.1(11C504)
  • Mojave版本10.14.4(18E226)

我正在执行的步骤: 1.使用Xcode启动iOS模拟器。 2.打开终端并运行`ideviceinfo -u:

ideviceinfo -u 175669E4-93EE-413A-83A0-2FEE6B419826
  1. 获得结果: ERROR: Device 175669E4-93EE-413A-83A0-2FEE6B419826 not found!

其他人在重复我的步骤后在终端中得到了这样的答案:

ideviceinfo -u BFD70ACE-3786-4BEE-B76D-D8D072EBAAC1
Usage: ideviceinfo [OPTIONS]
Show information about a connected device.

  -d, --debug       enable communication debugging
  -s, --simple      use a simple connection to avoid auto-pairing with the device
  -u, --udid UDID   target specific device by its 40-digit device UDID
  -q, --domain NAME set domain of query to NAME. Default: None
  -k, --key NAME    only query key specified by NAME. Default: All keys.
  -x, --xml     output information as xml plist instead of key/value pairs
  -h, --help        prints usage information

  Known domains are:

  com.apple.disk_usage
  com.apple.disk_usage.factory
  com.apple.mobile.battery
  com.apple.iqagent
  com.apple.purplebuddy
  com.apple.PurpleBuddy
  com.apple.mobile.chaperone
  com.apple.mobile.third_party_termination
  com.apple.mobile.lockdownd
  com.apple.mobile.lockdown_cache
  com.apple.xcode.developerdomain
  com.apple.international
  com.apple.mobile.data_sync
  com.apple.mobile.tethered_sync
  com.apple.mobile.mobile_application_usage
  com.apple.mobile.backup
  com.apple.mobile.nikita
  com.apple.mobile.restriction
  com.apple.mobile.user_preferences
  com.apple.mobile.sync_data_class
  com.apple.mobile.software_behavior
  com.apple.mobile.iTunes.SQLMusicLibraryPostProcessCommands
  com.apple.mobile.iTunes.accessories
  com.apple.mobile.internal
  com.apple.mobile.wireless_lockdown
  com.apple.fairplay
  com.apple.iTunes
  com.apple.mobile.iTunes.store
  com.apple.mobile.iTunes

Homepage: <http://libimobiledevice.org>

任何想法可能有什么问题吗? libimobiledevice已安装。 'ideviceinfo -u'命令可在真实的iOS设备上正常工作。

1 个答案:

答案 0 :(得分:0)

ideviceinfo(以及libimobiledevice的其他实用程序)仅适用于使用USB电缆或通过WiFi连接到计算机的真实物理设备。他们不能与模拟器一起使用。

您可以通过运行idevice_id -l列出可以通过libimobiledevice与之交互的所有设备的UDID。