It seems that connecting to https on iPhone has problems. I get NSURLErrorDomain.
It works in editor. And it works in Safari on iPhone using exact same URL. Any thoughts?
1 Like
I would suspect that there is an issue with the certificate for the server that is serving up the encrypted HTTPS data stream. Is there an associated error code with the error in the NSURLErrorDomain?
The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
If you want to repeat the problem just create a Monobehaviour with
public string url = "//google.com";
IEnumerator Start() {
WWW www = new WWW("http:"+url);
yield return www;
Debug.Log (www.text);
Debug.Log ("error="+www.error);
WWW www2 = new WWW("https:"+url);
yield return www2;
Debug.Log (www2.text);
Debug.Log ("error="+www2.error);
}
On iPhone, first will be ok, second will generate NSURLErrorDomain error -1012.
Both works ok in editor.
1 Like
The asset UniWeb works in B18 and can connect to https on iPhone. I guess it doesn’t use WWW class. (The asset Best HTTP do not work in Unity 5)