Appium1.13.0 似乎不支持 XCUITest Simulator 架构

XCUITest Simulator architecture appears to be unsupported by the Appium1.13.0

我正在尝试使用 Appium v​​1.13.0 测试本机 iOS 应用程序。

当我使用 iOS 模拟器执行测试时 Xcode 10.2,我从Appium服务器收到以下错误。

*********************************
*********************************
[XCUITest] Verifying application platform
[XCUITest] CFBundleSupportedPlatforms: ["iPhoneOS"]
[XCUITest] *********************************
[XCUITest] Simulator architecture appears to be unsupported by the '/var/folders/ld/f5b4gf396332hxdc9tw6kyrc0000gn/T/2019512-62665-1x5tail.vqbi/Payload/*****.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode.
[XCUITest] Don't be surprised if the application fails to launch.
[XCUITest] *********************************
[XCUITest] Reset requested. Removing app with id 'com.*****.mp' from the device
[XCUITest] Installing '/var/folders/ld/f5b4gf396332hxdc9tw6kyrc0000gn/T/2019512-62665-1x5tail.vqbi/Payload/*****.app' on Simulator with UUID '204794D9-CA97-479C-B004-8DBC04942CF5'...
[XCUITest] The app has been installed successfully.
[BaseDriver] Event 'appInstalled' logged at 1560335980109 (13:39:40 GMT+0300 (EEST))
*********************************
*********************************

您的应用程序似乎是专为 iPhoneOS 平台构建的,您将无法在模拟器中 运行 它,因为模拟器采用不同的架构(x86) while real iOS devices run on ARM

您需要执行 xcodebuild 命令并指定 iOS Simulator 平台作为输出目标,如:

xcodebuild build -workspace "*****.xcworkspace" -scheme "*****" -destination "platform=iOS Simulator,name=iPhone SE" -configuration Release

如果您无权访问应用程序源 - 不幸的是,您将只能使用真实的 iOS 设备对其进行测试,请查看 Appium XCUITest Driver Real Device Setup article for the required steps (by the way, the processes of generating/managing provisioning profiles and Simulators/devices are much easier with the Appium Studio)