0

I have a problem with a single app in Swift 2.0 iOS 9.2. This is the part of code:

@IBOutlet weak var web: UIWebView! 
@IBAction func enviar(sender: UIButton){
    let link = "https://www.cronicasmadeincoatza.com"

    let myURL = NSURL(string: link )
    let request = NSURLRequest (URL: myURL!)
    text.text = "\(myURL!)"
    web.loadRequest(request)

}

It only shows on a web view outlet but I have an error and I don't know why this is the error:

2016-01-07 13:11:00.934 webservice2[8547:457597] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Wil Ye
  • 1
  • does it *crash* the app, or does it just give you an error? Also, you usually want @IBOutlets to be `strong` and not `weak` (from what I understand) – Alex Popov Jan 07 '16 at 19:34
  • have an error so you recommend delete the weak and only write the @IBOutlet var web: UIWebView! ? – Wil Ye Jan 07 '16 at 19:49
  • and is swift 2.0 on swift i don't have the parameter strong – Wil Ye Jan 07 '16 at 19:51
  • and the error for see the web page is this 2016-01-07 13:50:52.418 webservice2[8779:472239] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843) – Wil Ye Jan 07 '16 at 19:52
  • The error is a misconfigured SSL Certificate. If you go to that same web page from the browser the SSL Certificate is set up for bluehost subdomains, but since it's been set up with a custom domain, the SSL Certificate is no longer valid. Try removing the "https" and making it "http" instead, and then allow insecure loads to your domain like so: http://www.neglectedpotential.com/2015/06/working-with-apples-application-transport-security/ – Alex Popov Jan 07 '16 at 19:54

0 Answers0