在 运行 ideviceinfo 命令后得到 'Device <iOS simulator id> not found!' 错误信息

Getting 'Device <iOS simulator id> not found!' error message after running ideviceinfo command

我正在做的步骤: 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 设备上正常工作。

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

您可以通过 运行 idevice_id -l.

列出您可以通过 libimobiledevice 与之交互的所有设备的 UDID