[英]Xcode UI Testing: lldb error “only available on iOS 9.0 or newer”
I have a fairly detailed (around 2000 lines of swift code) automation framework built with Xcode 7.3 and Swift for our iOS app. 我有一个相当详细的(约2000行快速代码)自动化框架,使用Xcode 7.3和Swift为我们的iOS应用程序构建。
Up till a recent point, I was able to use lldb
to build my framework ie 直到最近一点,我能够使用lldb
来构建我的框架,即
po XCUIApplication().debugDescription
and expr bla bla
to build the logic 使用po XCUIApplication().debugDescription
和expr bla bla
来构建逻辑 Pretty much all of a sudden, I now encounter the following error whenever running anything inside lldb
's console: 几乎突然之间,每当在lldb
的控制台中运行任何东西时,我现在都会遇到以下错误:
(lldb) po XCUIApplication()
error: <EXPR>:2:1: error: 'XCUIApplication' is only available on iOS 9.0 or newer
XCUIApplication()
^
<EXPR>:2:1: note: add 'if #available' version check
XCUIApplication()
^
<EXPR>:2:1: note: add @available attribute to enclosing instance method
XCUIApplication()
^
<EXPR>:2:1: note: add @available attribute to enclosing extension
XCUIApplication()
^
<EXPR>:10:9: warning: initialization of variable '$__lldb_error_result' was never used; consider replacing with assignment to '_' or removing it
var $__lldb_error_result = __lldb_tmp_error
~~~~^~~~~~~~~~~~~~~~~~~~
Googling and research has not gotten me anywhere significant. 谷歌搜索和研究并没有让我有任何重要意义。 The one relevant thread I found was in the fastlane project . 我发现的一个相关主题是在fastlane项目中 。 Unlike that comment, mine is a UI Test target. 与该评论不同,我的是UI测试目标。 Also, the test target's "iOS Deployment Target" is set to iOS 9.2 (in case that helps). 此外,测试目标的“iOS部署目标”设置为iOS 9.2(如果有帮助)。
What could be going wrong? 怎么可能出错?
Some exploration based on the answer below: https://stackoverflow.com/a/37335950/682912 根据以下答案进行一些探索: https : //stackoverflow.com/a/37335950/682912
This is a bug in the debug agent installed on your device. 这是设备上安装的调试代理中的错误。 These are bound to the iOS version, so it probably happened when you upgraded your device. 这些绑定到iOS版本,因此可能会在您升级设备时发生。 Anyway, please file a bug with http://bugreporter.apple.com . 无论如何,请在http://bugreporter.apple.com上提交一个错误。
If I'm right about the problem, it should only happen when debugging to the device, not on the simulator. 如果我对这个问题是正确的,那么只有在调试设备时才会发生,而不是在模拟器上。 That might allow you a temporary workaround till the bug gets fixed. 这可能允许您临时解决方法,直到错误得到修复。
Double check your .xcconfig with your test target or any other means that may set your IPHONEOS_DEPLOYMENT_TARGET to lower than 9.0. 使用您的测试目标或任何其他可能将您的IPHONEOS_DEPLOYMENT_TARGET设置为低于9.0的方法仔细检查您的.xcconfig。 Since UITest is only available on iOS9.0 or later, change IPHONEOS_DEPLOYMENT_TARGET to 9.0+ should fix the issue. 由于UITest仅适用于iOS9.0或更高版本,因此将IPHONEOS_DEPLOYMENT_TARGET更改为9.0+应解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.