Swift: How to Make Https Request Using Server SSL Certificate
<p>Hi I want to make Https Request in Swift. Currently im accessing local server through ip address. Local Server has one SSL Certificate by accessing the certificate want to make request to server currently im doing like this.</p>

<pre><code>  Alamofire.request(.GET, https://ipaddress//, parameters: [param], headers: headers)
        .responseJSON { response in
            print(response.request)  // original URL request
            print(response.response) // URL response
            print(response.data)     // server data
            print(response.result)   // result of response serialization

            if let JSON = response.result.value {
                print("JSON: \(JSON)")


            }
    }
</code></pre>

<p>I have used the above code for making request and in plist </p>

<pre><code> &lt;key&gt;NSAppTransportSecurity&lt;/key&gt;
 &lt;dict&gt;
  &lt;key&gt;NSExceptionDomains&lt;/key&gt;
  &lt;dict&gt;
        &lt;key&gt;192.168.2.223:1021(my local ip)&lt;/key&gt;
        &lt;dict&gt;
        Include to allow subdomains--&gt;
            &lt;key&gt;NSIncludesSubdomains&lt;/key&gt;
            &lt;true/&gt;
           &lt;!--Include to allow insecure HTTP requests--&gt;
           &lt;key&gt;NSTemporaryExceptionAllowsInsecureHTTPLoads&lt;/key&gt;
            &lt;true/&gt;
            &lt;!--Include to specify minimum TLS version--&gt;
           &lt;key&gt;NSTemporaryExceptionMinimumTLSVersion&lt;/key&gt;
            &lt;string&gt;TLSv1.1&lt;/string&gt;
        &lt;/dict&gt;
    &lt;/dict&gt;
&lt;/dict&gt;
</code></pre>

<p>in plist i have given like this but im still getting error like </p>

<pre><code>NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
</code></pre>