Reputation: 9140
I'm using Xcode Version 8.3.3 and I'm trying to XCTContext on Swift but I'm getting the following error:
Use of unresolved identifer XCTContext
This is implementation:
XCTContext.runActivity(named: "Capture screenshot") { activity in
let screen = XCUIScreen.main
let screenShot = screen.screenshot()
let attachment = XCTAttachment(screenshot: screenShot)
attachment.lifetime = .keepAlways
activity.add(attachment)
}
XCTContext doesn't event show in autocomplete:
Any of you knows why I'm getting this error?
I'll really appreciate your help
Upvotes: 0
Views: 1083
Reputation: 12949
XCTContext is only available with Xcode 9. That's why you get this error when trying to use it with Xcode 8.x
Upvotes: 2