According to the class reference, the completion handler for captureStillImageAsynchronouslyFromConnection accepts a NSError object, but it is not an optional.
Function Declaration:
func captureStillImageAsynchronouslyFromConnection(connection: AVCaptureConnection!, completionHandler handler: ((CMSampleBuffer!, NSError!) -> Void)!)
Yet in the description for the parameters, it says nil may be returned in the completion handler in place of the NSError object if the request was fulfilled.
Parameters Description:
If the request could not be completed, an NSError object that describes the problem; otherwise nil.
The description suggests the declaration should contain an optional for the NSError object, doesn't it? Aren't the parameters description and function declaration conflicting?