Skip to content

Instantly share code, notes, and snippets.

@ariok
Last active September 23, 2015 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariok/9927d1a462b915442329 to your computer and use it in GitHub Desktop.
Save ariok/9927d1a462b915442329 to your computer and use it in GitHub Desktop.
//This code works correctly in the Application target, while in the Test target I get this warning:
//Cast from 'XCUIElement!' to unrelated type 'String' always fails.
//JSON is of type AnyObject?
let fieldErrors = JSON!["errors"] as? [String:String]
//I've already tried to convert this code in a more "swift 2" format using guard and removing the "optional"...nothing changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment