Forum Xamarin.iOS

Httpclient for TLS 1.2

RaghavVRaghavV USMember ✭✭

I want to enable TLS1.2 for my application. But since the web api is still in development, SSL is not enabled yet.
But the problem is the http requests succeed without any error.

This is what I have :
1. in iOS project, I have NSURLSession(ios 7+) for httpclient implementation
2. In Portable project , initialized the httpclient like this
HttpClient client = DependencyService.Get<ITouchInterface>().nativeHttpClient();
3. When initializing HttpClient, I use a dependency service and return the httpclient like this

    public HttpClient nativeHttpClient()
          return new HttpClient(new NSUrlSessionHandler());
  1. I have not opted out of ATS
  2. I call a http resource say (

In ios 9.0 and above, this should fail because ATS would be enabled. But if I run this on an iPhone, the http request succeeds without any error.

Am I missing something?


Sign In or Register to comment.