With Swift 1.2 and Xcode 6.3, the sendAsynchronousRequest:queue:completionHandler: signature
class func sendAsynchronousRequest(request: NSURLRequest, queue: NSOperationQueue!, completionHandler handler: (NSURLResponse!, NSData!, NSError!) -> Void)
With Swift 2 and Xcode 7, however, the signature of sendAsynchronousRequest:queue:completionHandler: has changed now:
// Note the non optionals, optionals and implicitly unwrapped optionals differences class func sendAsynchronousRequest(request: NSURLRequest, queue: NSOperationQueue, completionHandler handler: (NSURLResponse?, NSData?, NSError?) -> Void)
As a result, switching to Swift 2 and Xcode 7 beta, you will have to change the implementation of the completionHandler parameter and make sure that your queue parameter is not optional.
source share