- Home /
Does WebClient support HTTPS on Android?
I'm using the WebClient
to do the HTTPS request in my game. The reason why I didn't use WWW
is because I need to keep the tcp connect.
It was working fine on iOS but no luck on Android and I got this message:
Unity : Unable to find /System/Library/Frameworks/Security.framework/Security
Does this mean WebClient
can't work with HTTPS on Android?
As far as I know does Webclient not support https at all... I had a similar problem, and fixed it with an WWW but I am not sure how to keer the connection with tcp while using an WWW request..
In my practices the WebClient
DO support https, at least in Editor and iOS. According the the message about Security.framework
I guest the reason might be related to certificate validation so I'm going to try to skip that via making ServicePoint$$anonymous$$anager.ServerCertificateValidationCallback
return true. I will update the comment after then.
I think that should be a bug since the Security.framework
is some kind of iOS library name. The function for Android might not be implemented.
Answer by jayatubi · Nov 02, 2016 at 08:06 AM
I tried to skip the SSL certificate validation as this post http://stackoverflow.com/a/18624335/2289969, now the WebClient
could retrieve data from the HTTPS server.
Thank you, I was facing the same issue and this solved my problem!