title: NSURLErrorFailingURLPeerTrustErrorKey in Swift playground
body: <p>The playground code at the bottom works as expected when the URL is</p>
  
  <pre><code>http://www.apple.com
  </code></pre>
  
  <p>and fails when the URL is</p>
  
  <pre><code>https://www.apple.com
  </code></pre>
  
  <p>NSURLErrorFailingURLPeerTrustErrorKey</p>
  
  <p>I'm guessing that there is something wrong with sharedSession and https? Any suggestions?</p>
  
  <pre><code>// Playground - noun: a place where people can play
  
  import Foundation
  import XCPlayground
  
  //  allow the asynchronous task to continue, set timeout in console
  
  XCPSetExecutionShouldContinueIndefinitely()
  
  let plainURL = NSURL(string: "https://www.apple.com/")
  
  var session = NSURLSession.sharedSession()
  
  func firstHandler(data:NSData!, response:NSURLResponse!, error: NSError!) {
      if let err = error {
          println("WTF error: \(error), \(error.userInfo)")
      }
      else {
          println("No error!")
          print(NSString(data: data, encoding: NSUTF8StringEncoding)!)
      }
  }
  
  var plainTask:NSURLSessionDataTask = session.dataTaskWithURL(plainURL!, completionHandler: firstHandler)
  
  plainTask.resume()
  </code></pre>