我正在尝试使用 Appium v1.13.0 测试 native iOS 应用程序。
当我使用 iOS Simulator 执行测试时 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),而真正的 iOS 设备运行在 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所需步骤的文章(顺便说一句,使用 Appium Studio 生成/管理配置文件和模拟器/设备的过程要容易得多)
关于ios - Appium1.13.0 似乎不支持 XCUITest Simulator 架构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56560670/