I am having an issue when communicating with back-end web server with https. It works fine with HTTP. My
app consumed WCF web service and hosted on IIS. I've used HttpClient in code.
My server has a self-signed certificate. I have made the below changes to my source code.
Updated the infor.plist as given below.
NSAppTransportSecurity
NSAllowsArbitraryLoads
NSExceptionDomains
ip address without port number
NSExceptionMinimumTLSVersion
TLSv1.0NSExceptionRequiresForwardSecrecy
NSExceptionAllowsInsecureHTTPLoads
NSIncludesSubdomainsAdded below code to appdelegate class in iOS project
ServicePointManager
.ServerCertificateValidationCallback += (sender, cert, chain,
sslPolicyErrors) => true;
I also get an error message "Your connection is not private" when the API is browsed. I can continue with an error. but I can not access the resource (backend data) through web service, does not give me any result. it works fine with HTTP.
Does anyone know how to use HTTP client with https in cross-platform development? What are alternative methods to use https? How can I ignore the SSL error?