title: Swift HTTP request works on the simulator but not in a real device
body: <p>i created a watchOS app that request a value from an API and show it on a label.
  It is working perfectly in the simulator but when I execute it on my Apple Watch it crashes with the following error:</p>
  
  <pre><code>[ERROR] There is an unspecified error with the connection
  fatal error: unexpectedly found nil while unwrapping an Optional value
  </code></pre>
  
  <p>The first error is generated by my code.</p>
  
  <p>The code I wrote is:</p>
  
  <pre><code>func price_request() -&gt; NSData? {
  
      guard let url = NSURL(string: "https://api.xxxxx.com/xxx.php") else {
          return nil
      }
  
      guard let data = NSData(contentsOfURL: url) else {
          print("[ERROR] There is an unspecified error with the connection")
          return nil
      }
  
      print("[CONNECTION] OK, data correctly downloaded")
      return data
  }
  
  func json_parseData(data: NSData) -&gt; NSDictionary? {
      do {
          let json: AnyObject = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers) as! Dictionary&lt;String, AnyObject&gt;
          print("[JSON] OK!")
  
          return (json as? NSDictionary)
  
      } catch _ {
          print("[ERROR] An error has happened with parsing of json data")
          return nil
      }
  }
  </code></pre>
  
  <p>I tried also to add the App Transport Security bypass also if it is not needed because of a request to an HTTPS URL but it does not works.</p>
  
  <p>Can you please help me?</p>
  
  <p>Thank you</p>