我正在尝试使用Appium v1.13.0测试本地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))
*********************************
*********************************
答案 0 :(得分:1)
您的应用程序似乎仅是为iPhoneOS
平台构建的,您将无法在模拟器中运行该应用程序,因为模拟器在实际的iOS设备上运行时会采用不同的架构(x86) 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)/管理配置文件和模拟器/设备要容易得多