You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I copied your syncAlamofire code from your project to my project.
I am seeing this error on line 69
Cannot convert value of type 'NSError' to expected argument type 'FailureJSONResponse'
60 func syncTypeUsingAlamofire(completion: @escaping (_ result: VoidResult) -> ()) {
61 Alamofire.request("http://dafounders.com/esogearcopytype.php").responseJSON { response in
62 if let jsonObject = response.result.value, let gearTypeJSON = jsonObject as? [[String: Any]] {
63 self.dataStack.sync(gearTypeJSON, inEntityNamed: GearType.entity().name!) { error in
64 completion(.success)
65
66
67 }
68 } else if let error = response.error {
69 completion(.failure(error as NSError))
70 } else {
71 fatalError("No error, no failure")
72 }
The text was updated successfully, but these errors were encountered:
I copied your syncAlamofire code from your project to my project.
I am seeing this error on line 69
Cannot convert value of type 'NSError' to expected argument type 'FailureJSONResponse'
60 func syncTypeUsingAlamofire(completion: @escaping (_ result: VoidResult) -> ()) {
61 Alamofire.request("http://dafounders.com/esogearcopytype.php").responseJSON { response in
62 if let jsonObject = response.result.value, let gearTypeJSON = jsonObject as? [[String: Any]] {
63 self.dataStack.sync(gearTypeJSON, inEntityNamed: GearType.entity().name!) { error in
64 completion(.success)
65
66
67 }
68 } else if let error = response.error {
69 completion(.failure(error as NSError))
70 } else {
71 fatalError("No error, no failure")
72 }
The text was updated successfully, but these errors were encountered: