title: How to make a request to localhost via iOS device (using Xcode)?
body: <p>I have a localhost website up at localhost:1336. When I run it on my simulator using Xcode, the app does not encounter any problem make a request to the localhost for data. But when I connect my iPhone via USB cable to the mac, and run the app on the iPhone device and makes the request, but then I get an error "Error- Could not connect to the server.".</p>
  
  <p>I also confirmed that they are on the same Wi-Fi and using same IP. On Safari on my iPhone, I went to <a href="http://IPNumber:1336" rel="nofollow">http://IPNumber:1336</a> and it was able to access the site via my iPhone. But some reason, through the app, it cannot connect to the server. </p>
  
  <p>Any input or insight on this would be greatly appreciated. Thank you in advance. </p>