- Home /
What prevents an app from hitting a link that works in browser?
I'm using a temporary local web server to test my iOS app, just some PHP pages that return text that my app processes for data. The address is in the form of "http://192.168.1.XX:81/SomePage.php"
This works totally fine in the editor, and as well I can hit that page via Chrome or Safari on my device, connected to the same wifi network of course, and the page loads up fine. However when running the app on device, I get the WWW error: "Could not connect to the server".
Is there some sort of block happening either within unity or on iOS apps in general, that doesn't let me use either an IP based link, or a link with a specified port? Or perhaps I'm just missing something more obvious? I've tried disabling cellular data just on a guess, but that didn't change the results. Any other ideas?
Answer by niall1111 · Jul 31, 2014 at 03:57 PM
Well, it turned out to be a public variable thing. I had previously declared the variable using the 127.0.0.1 IP, and changed the default to use the internal network IP instead. However, the gameObject was still pointing to the old address.