简体   繁体   中英

XCode 6.3 Alamofire.swift file crashed

I'm new in swift. I use Alamofire in my project. Also, I installed XCode 6.3. Then, Alamofire.swift file crashed. I fixed all errors, but I could not fix the code below in Alamofire.swift file:

public func response(completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self {
    return response(Request.responseDataSerializer(), completionHandler: completionHandler)
}

It says that missing argument for parameter 'serializer' in call .

How can I fix it ?

Thank you for your answers,

Best regards

Just FYI, Alamofire 1.2.0 was released this morning which fully supports Swift 1.2 and Xcode 6.3. You no longer need to use the xcode-6.3 branch. That will certainly resolve your missing argument for parameter 'serializer' in call issue.

You should currently use the Alamofire Xcode 6.3 branch: https://github.com/Alamofire/Alamofire/tree/xcode-6.3

Because IOS 8.3 is out now, I guess they will merge it soon into the main branch.

Replace with this method :-

 public func response(completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self {
        return response(serializer: Request.responseDataSerializer(), completionHandler: completionHandler)

    }

more Detail then click here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM