I can not open static HTML pages served from a HTTP server run on my MacBook in iPhone 6s iOS 9.2, neither in 'Safari' nor in 'Chrome' browser when using: http://ipNumberOfMyServer:portNumber
I am able to open the pages on Android phones and I'm also able to open the pages if I turn MacBook's WiFi off and on, but if I change the page and refresh the browser, it again fails to load the page and says that server has stopped responding or that Safari could not connect to the server.
Resetting network settings in iPhone didn't help, nor did turning off Cellular Data in iPhone settings. Any idea what's wrong?
I know this is old already. You can get you computer name from System Preferences -> Sharing
System Preferences->Sharing
in your iPhone safari, type http://JimbasMekbuk.local
if you using different port, say 3000, then add :3000
make sure you turn off firewall
I hope this will help :-)
I had a similar problem, I changed the Wi-Fi network from 5GHz to 2.4GHz and this fixed it.
Related
My iOS app is not detecting a network connection when I run it in the simulator in Xcode. The Simulator can connect otherwise, if I open it directly, I can load web pages in Safari, but I can't get the app to detect a connection.
Some time Internet will not connected with the Simulatore .
Just Click on
Simulatore -> Reset content and setting
And reset it , and make some internet is connected with your system .
May be it helps you or feel free?
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.".
I also confirmed that they are on the same Wi-Fi and using same IP. On Safari on my iPhone, I went to http://IPNumber:1336 and it was able to access the site via my iPhone. But some reason, through the app, it cannot connect to the server.
Any input or insight on this would be greatly appreciated. Thank you in advance.
the term 'localhost' means the same device, i think you mean a host on your local network? going localhost:1336 means your device is connecting to itself, its the same as going 127.0.0.1:1336. hence why it works on your simulator but not your phone, since your server and simulator are running on the same device
you have to use http://IPNumber:1336 in your app as well
"Localhost" means the same device. If you are not running a HTTP service on your iPhone, you should not use "localhost".
Another point, you are using "http", if your iPhone is running iOS9+, you will need to check whether App Transport Security will be an issue, here is an article on how to do that: http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/
I am creating Rails server for iPhone app.
I want to debug on iPhone device not on iPhone simulator.
So, I connect iPhone to mac book air by USB, and connect to Rails server.
But, iPhone could not connect to Rails server.
Environment
Rails 4.2.3
Server localhost:3000
Xcode 6.4
iPhone iOS 8.4.1
en0 inet 192.168.11.7
As long As I searched, when iPhone device connect to localhost server, the url is http://192.168.11.7:3000/~.
But, mac console show nothing and xcode show "The request timed out." after a while.
If anyone know how to fix the problem, please tell me.
Use the wonderful http://xip.io/
You don't need to install anything - just go to
http://192.168.11.7.xip.io:3000
on your phone.
If you want to use a particular domain name, eg if your app behaves differently depending on domain names or subdomains, you can do eg
http://mydomain.foo.192.168.11.7.xip.io:3000
EDIT: my answer is actually about connecting to your server over the internet rather than a usb cable. I'd recommend that you use the internet rather than the USB option if possible as it's simpler. xip.io will not work if you can't access the internet.
You probably tried that but funny enough, in my case turning my iPhone off and on again actually fixed the issue.
I had the same problem, my app was working fine and all of a sudden it stopped working although nothing had changed. I could access the internet, the browser was accessing the rails app url just fine but my iOS app did not seem to be able to connect to it.
I needed to run my iOS app from Xcode with my local rails server to my device and xip.io was the solution.
Get the ip address of your computer from the wireless network you are connected to and put that into networking.swift like so.
http://11.1.11.100.xip.io:3000
Make sure the rails server is running and your device is connected to the same network as your computer and build the app.
I want to test a project from the BlackBerry simulator, but our webservice runs on an external server that can only be accessed using the vpn from our PC's.
I can access the webservice from the Android simulator without doing anything special. However I cannot access the webservice from the BlackBerry simulator -- not even from the browser of the simulator -- though I am able to connect to other services on the web from the BlackBerry simulator.
What kind settings are there to fix this?
There's a network setting for the simulator that might be useful for situations like this. You could try manually assigning the vpn ip address you were given.
/ip-address={string}
IP address of the simulated handheld. This should be left blank under normal circumstances. If running on a PC with multiple IP addresses, one can be specified here to cause the simulator to use it.
Cheers
Ray
Ok...anyone bumping on the same problem...
Append ";deviceside=true" to the URL from which data is to be fetched
My PC configured behind a proxy server for internet access. I referred to the blackberry simulator related posts and changed my MDS server setting as follows
application.handler.http.proxyEnabled = true
application.handler.http.proxyHost=hostname
application.handler.http.proxyPort=hostport
application.handler.http.proxyUser=username
application.handler.http.proxyPass=password
After this when MDS is started with simulator, I am able to use the browser. But when I click the browser it asks for the username, password and domain name. After this the internet works properly
Here is the problem. For the same settings when I click the maps app in the blackberry it is not working. Kindly let me know what has to be changed.
Not all apps will use the MDS transport to communicate - for example if the app uses Direct TCP or Wi-Fi, it will bypass your MDS server and go directly over the computer's TCP/IP stack (when running in the simulator). Unfortunately in this case the simulator doesn't use any system-level proxy settings (i.e. the proxy settings set in IE) -- so it won't know about your proxy server and probably fail.
I've mentioned this deficiency to RIM and I'm hopeful they'll address it in future emulators. It would make it so much easier to debug with tools such as Charles or Fiddler.