Background
I have a fairly detailed (around 2000 lines of swift code) automation framework built with Xcode 7.3 and Swift for our iOS app.
Up till a recent point, I was able to use lldb
to build my framework i.e
- insert breakpoint and run code up till that point
- use
po XCUIApplication().debugDescription
andexpr bla bla
to build the logic - repeat
Problem
Pretty much all of a sudden, I now encounter the following error whenever running anything inside lldb
's console:
(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
~~~~^~~~~~~~~~~~~~~~~~~~
Notes
Googling and research has not gotten me anywhere significant. The one relevant thread I found was in the fastlane project. Unlike that comment, mine is a UI Test target. Also, the test target's "iOS Deployment Target" is set to iOS 9.2 (in case that helps).
- To the extent I remember, I haven't changed anything significantly in recent times.
- My device is (and has always been) iOS 9+.
What could be going wrong?
Update 20 May 2016
Some exploration based on the answer below: https://stackoverflow.com/a/37335950/682912
- The issue happens only on real devices. Simulators do not face this problem.
- On real device (iPhone 6S+, iOS 9.2.1), I did a full reset of Content and Settings. This did not fix the issue.