WWW problem : URL with blank symbol not functional on iOS

So, I tried making a WWW call to download some media on my web server.

It works fine for most of the files except when the url has a blank symbol e.g. the texture file name “hello world.png”
it will return “Bad URL” error message and not download anything. This only happens on iOS.

I also tried convert the url string using System.Uri.EscapeUriString() so the file name becomes “hello%20world.png”
but still no luck. :frowning:

Again, I have no problem on Android or Standalone.
Have anyone experienced the same problem before?

So, to solve this, use System.Uri.EscapeUriString() to convert your url to a friendly one.

For example,

http://www.domain.com/hello world.mp3

will be converted to


Note that, base on my experiment, I only need to do this on iOS.
Other platforms work with the url with blank symbol just fine, without having to convert.

However, it’s a good practice to always convert to friendly url string.
In case there’s any other character that’s not very friendly, I think. :slight_smile: