I am working with this code snippet below from the SwiftyJson docs and I am receiving the errors Enum case 'Success' not found in type 'Result
Alamofire.request(.GET,` url).validate().responseJSON { response in
switch response.result {
case .Success(let value):
let json = JSON(value)
print("JSON: \(json)")
case .Failure(let error):
print(error)
}
}
What version of Alamofire are you using?
Enums are lower case, so change to .success and .failure in Swift 3
Awesome @jeneumeier. Making success and failure lowercase did the trick. Thank you.
@jeneumeier nice catch, let me update README as well.
馃嵒
Most helpful comment
Enums are lower case, so change to .success and .failure in Swift 3