Does WWW not work on IOS?

My app works as designed when in the Editor but I have found when I export to IOS the code I use to get a string value from my server just does not work?

Here is the bare bones of the code that works fine in Editor which when I run on IOS device the debug logs displayed are:

going to start co
WaitForRequest
return www
after co

and thats it, none of the code after yield return www runs on IOS but they do in Editor??

Help please??

Thanks

public void Start() {

String url = “path to my site”;

WWW www = new WWW(url);

Debug.Log(“going to start co”);

StartCoroutine(WaitForRequest(www));

Debug.Log(“after co”);
}

private IEnumerator WaitForRequest(WWW www) {

Debug.Log(“WaitForRequest”);

while (!Caching.ready) {

Debug.Log(“!Caching”);

yield return null;
}

Debug.Log(“return www”);

yield return www;

Debug.Log(“before www.error check”);

if (www.error == null) {

// will do my stuff here
}
}

I’ve tried all manner of things and just cant get this to work on IOS device??

This is my latest attempt:

private String url = "http:// to my url";

public void Start() {


	StartCoroutine(WaitForRequest());

}

private IEnumerator WaitForRequest() {
	

	WWW www = new WWW (url);

	yield return www;

	
	if ( www.error == null || www.error == "") {
	
		// do stuff
	}

}

The yield seems to push back and code after the StartCoroutine runs, but the code after yield never fires?

Are you sure the error is null and not just empty? Do you log the error if there is one?

found this, then looked for more recent patches, install and problem solved, so was a glitch in Unity but fortunately they fixed it :slight_smile:

1 Like

where is the patch?