2015-11-24 40 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