找不到设备的配对记录…-尝试将Appium连接到真正的iPhone设备时出现问题/Appium无法连接到真正的iPhone

找不到设备的配对记录…-尝试将Appium连接到真正的iPhone设备时出现问题/Appium无法连接到真正的iPhone,iphone,appium,appium-ios,Iphone,Appium,Appium Ios,所以我尝试在物理iPhone上运行一些测试,但由于某些原因,它不起作用。 在内置Xcode iPhone模拟器、Android模拟器和真正的Android设备上正常工作-这是iPhone真正设备的唯一问题。ios deploy正在查看已连接的设备,但似乎Appium一开始看到该设备,但后来无法连接到该设备,因为它找不到设备的配对记录,无论这意味着什么 试用了两款不同的iPhone11@13.2和iPhone8@13.1 尝试使用Appium CLI 1.16/Desktop 1.15.1 App

所以我尝试在物理iPhone上运行一些测试,但由于某些原因,它不起作用。 在内置Xcode iPhone模拟器、Android模拟器和真正的Android设备上正常工作-这是iPhone真正设备的唯一问题。ios deploy正在查看已连接的设备,但似乎Appium一开始看到该设备,但后来无法连接到该设备,因为它找不到设备的配对记录,无论这意味着什么

试用了两款不同的iPhone11@13.2和iPhone8@13.1 尝试使用Appium CLI 1.16/Desktop 1.15.1 Appium返回的错误消息: 错误:找不到设备0000830-000A11413E00802A的对记录。请先与设备配对

以下是包含上述错误的日志:

[XCUITest] Available devices: 00008030-000A11413E00802A
[XCUITest] Creating iDevice object with udid '00008030-000A11413E00802A'
[XCUITest] Getting the platformVersion from the phone since it was not specified in the capabilities
[XCUITest] Determining device to run tests on: udid: '00008030-000A11413E00802A', real device: true
[XCUITest] Normalized platformVersion capability value '13.2.0' to '13.2'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1578909419779 (10:56:59 GMT+0100 (CET))
[BaseDriver] Event 'appConfigured' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[BaseDriver] Event 'resetStarted' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[XCUITest] Continuing without capturing device logs: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
[XCUITest] Setting up real device
[XCUITest] Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
[XCUITest]     at startLockdownSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-ios-device/lib/utilities.js:108:13)
[DevCon Factory] Releasing connections for 00008030-000A11413E00802A device on any port number
[DevCon Factory] No cached connections have been found
[BaseDriver] Event 'newSessionStarted' logged at 1578909419790 (10:56:59 GMT+0100 (CET))
[MJSONWP] Encountered internal error running command: Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device

有人知道这里有什么问题吗?我该如何解决它?

所以,我所要做的就是安装idevicepair,它捆绑在libimobiledevice中。所以我所要做的就是:

brew install libimobiledevice
验证是否正确安装了idevicepair,并且它可以通过以下方式查看已连接的iPhone:

idevicepair list
一切正常后,您可以将设备与

idevicepair --udid [here goes UDID of your iPhone] pair
这对我很有用: