I have this code:
func loginWithBasicAuth() -> Void {
    let usernameText = username.text
    let passwordText = password.text
    let credentialData = "\(usernameText):\(passwordText)".dataUsingEncoding(NSUTF8StringEncoding)
    let base64Credentials = credentialData?.base64EncodedStringWithOptions([])
    let headers = ["Authorization": "HTTP Basic \(base64Credentials)"]
    Alamofire.request(.GET, "https://api.domainname.com/v0.1/", headers: headers).responseString { aResponse in
        if let receivedString = aResponse.result.value {
            print(receivedString)
        } else {
            print("Login failed.")
        }
    }
}
In the console it prints:
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Login failed.
Here's the configuration in the info.plist file:

What's wrong?
 
     
     
     
     
    