Giter Club home page Giter Club logo

Comments (3)

evermeer avatar evermeer commented on June 17, 2024

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.

wajahatch888 avatar wajahatch888 commented on June 17, 2024

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.

evermeer avatar evermeer commented on June 17, 2024

Great to hear it's solved. Thanks for letting me know.

from alamofirejsontoobjects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.