Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Problems with WWW("https://... ", formData) and iPhone on B18

Discussion in 'Unity 5 Pre-order Beta' started by bjornrun, Jan 3, 2015.

  1. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    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?
     
    Claytonious likes this.
  2. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    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?
     
  3. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
     
  4. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    If you want to repeat the problem just create a Monobehaviour with

    Code (CSharp):
    1. public string url = "//google.com";
    2.     IEnumerator Start() {
    3.         WWW www = new WWW("http:"+url);
    4.         yield return www;
    5.         Debug.Log (www.text);
    6.         Debug.Log ("error="+www.error);
    7.         WWW www2 = new WWW("https:"+url);
    8.         yield return www2;
    9.         Debug.Log (www2.text);
    10.         Debug.Log ("error="+www2.error);  
    11.     }
    On iPhone, first will be ok, second will generate NSURLErrorDomain error -1012.
    Both works ok in editor.
     
    Claytonious likes this.
  5. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    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)