www 404 error only on iOS

Hi

I have a problem with WWW, only on iOS device.
trying to download a simple plain text-file from web server.

The URL looks like this… http://a.b.c/d_e/0.1.2/target.txt
It has alphabetic characters and some special characters only ( : / . _ ).
Has no blank space, etc. and hard-coded.

And my script(pseudo code) is…

    IEnumlator Start()
    {
       Debug.Log( url );
       using( WWW www = new WWW(url) )
       {
          if ( false == www.isDone )
          {
             Debug.Log( "yield.." );
             yield return null;
          }

          if ( null != www.error )
          {
             Debug.Log( www.error );
          }
          else
          {
             Debug.Log( "SUCCEED!" );
          }
      }
   }

Have tested…

  1. Windows7 + unity editor 4.6.1p5
  2. OSX Mavericks + unity editor 4.6.2
  3. OSX Yosemite + unity editor 4.6.3
  4. Safari, Chrome, IE…
  5. Android device (4.3)
  6. iOS device (7.x)

case 1,2,3,4,5 they all show me the “SUCCEED!” on log.
( Web browser display the contents of target file. )
but, “404 Not Found” only on ios

All log looks like below on ios


http://a.b.c/d_e/0.1.2/target.txt
yield… ← just one time.
404 Not Found

What i have missed?

Thanks.

I know that you said you’re using iOS7, but something to keep in mind is ATS for iOS9 which you will need to setup within the XCode plist to make these kind of calls. Application Transport Security ? | Apple Developer Forums

As for your immediate problem, there is the obvious issues such as making sure your device can actually connect to any web service. Assuming that’s ok, it might be worth modifying the url (e.g. append ‘?randomNumber’ to the end of the url) or as a temporary test placing a second file on the server and try to read that in order to avoid caching.