Comments (3)
Indeed in version 1.6.0 the need for required initializers was removed so that the required initializers could also been made not required in EVReflection.
It's strange that you say that it has been upgraded to version 1.6.0 because the code in your screenshot is from an earlier version. the code should have looked like this:
public func responseObject<T:EVObject>(queue: dispatch_queue_t? = nil, encoding: NSStringEncoding? = nil, completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result<T, NSError>) -> Void) -> Self {
return responseString(encoding: encoding, completionHandler: { (response) -> Void in
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
dispatch_async(queue ?? dispatch_get_main_queue()) {
switch response.result {
case .Success(let json):
let t = T()
let jsonDict = EVReflection.dictionaryFromJson(json)
EVReflection.setPropertiesfromDictionary(jsonDict, anyObject: t)
completionHandler(self.request, self.response, Result.Success(t))
case .Failure(let error):
completionHandler(self.request, self.response, Result.Failure(error ?? NSError(domain: "NaN", code: 1, userInfo: nil)))
}
}
}
})
}
I just did a pod update in my other projects and I get the correct version. Could you try doing another 'pod update' ?
Could you test if you see the code above in your Pods/Pods/AlamoFireJsonToObjects/AlamoFireJsonToObjects.swift ?
from alamofirejsontoobjects.
Thanks for reply.
It was xcode issue. Whenever i perform 'pod update', Pods gets updated but xcode still shows old code. I restarted the xcode and every thing runs smoothly.
from alamofirejsontoobjects.
Great to hear it's solved. Thanks for letting me know.
from alamofirejsontoobjects.
Related Issues (20)
- Nested Generics HOT 1
- Swift 3 and Alamofire 4 HOT 3
- get Array with key HOT 3
- Migration help needed HOT 9
- Could not create an instance for type "Forecast" HOT 10
- [Question] What happens if the response is not of expected type? HOT 5
- Swift 2.3 and Alamofire 3.5 support? HOT 3
- 1.6 version uses EVReflection swift 3 version HOT 2
- .description outputs a boolean as a number (0 or 1) HOT 3
- Mapping list of objects? HOT 2
- Use legacy swift error with swift 3 HOT 4
- Incorrect arguments label in call HOT 12
- Is not key value coding-compliant for the key __response_statusCode? HOT 10
- Error parsing array swift 3 HOT 2
- Array mapping return empty array HOT 13
- Help with usage HOT 2
- Build error when including as CocoaPod HOT 4
- Swift Compiler Error for Xcode 8.3 HOT 7
- Problems after updating the pod and to Swift4 HOT 1
- Compiling for iOS 8.0, but module 'Alamofire' has a minimum deployment target of iOS 10.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alamofirejsontoobjects.