2015-11-24 44 views
1

我仍然有两个错误,它们是相同的错误。不知道什么是错的。我甚至从源Alamofire文档复制和粘贴,并确保豆荚是最新的,但同样的错误。Alamofire.swift completionHandler参数#2在调用中缺少参数

public func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) { 
     if sessionDidReceiveChallenge != nil { 
      completionHandler(sessionDidReceiveChallenge!(session, challenge)) // Missing argument for parameter #2 in call 
     } else { 
      completionHandler(.PerformDefaultHandling, nil) 
     } 
    } 

enter image description here

回答

1
从它的外观

嘛。错误是说你缺少NSURLCredential的值。尝试这个。

completionHandler(sessionDidReceiveChallenge!(session, challenge),nil) 
+0

nope did not work :( – TokyoToo