How to use NSURLConnection to connect with SSL for an untrusted cert?

I have the following simple code to connect to a SSL webpage NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL:url]; [ NSURLConnection sendSynchronousRequest: urlRequest returningResponse: nil error: &error ]; Except it gives an error if the cert is a self signed one Error Domain=NSURLErrorDomain Code=-1202 UserInfo=0xd29930 “untrusted server certificate”. Is there a way to set it to accept connections anyway … Read more

How do I load an HTTP URL with App Transport Security enabled in iOS 9? [duplicate]

This question already has answers here: Transport security has blocked a cleartext HTTP (29 answers) Closed 6 years ago. So, the new beta SDK of iOS released last night has “App Transport Security” which encourages developers to use https instead of http. In principle, this is a great idea, and I already use https in … Read more

Transport security has blocked a cleartext HTTP

What setting do I need to put in my info.plist to enable HTTP mode as per the following error message? Transport security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file. Assume that my domain is example.com. 2 29 Use NSAppTransportSecurity: You … Read more