Hi please read the whole thing before down vote,
I have tried this solutions already, 1 ,2, 3 but still no solution,
Now my problem here is I am trying to connect app to Camera in same LAN, so URL : https://LocalIP:PORT/cam_username/cam_password, in response I should get Image, this is the code just incase for reference.
let url = URL(string: url1)
if url != nil
{
DispatchQueue.global(qos: DispatchQoS.QoSClass.default).async
{
let data = try? Data(contentsOf: url!)
if (data != nil)
{
DispatchQueue.main.async(execute: {
let indexPath = IndexPath(row : i, section : 0)
if let cell : CamTableViewCell = self.tableView .cellForRow(at: indexPath) as? CamTableViewCell
{
cell.ImageLive.image = UIImage(data: data!)
}
});
}
}
}
Response : data = nil and this message in console
[] nw_coretls_read_one_record tls_handshake_process: [-9801] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)
EDIT : my plist contains this
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
NOTE: URL works fine and shows me Image on Browser.