Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS simulator cant connect to local network IP address

To start, I used to be able to access locally hosted files on my simulator app with no problem.

After updating to OS X Yosemite, I can't connect to addresses like http://192.168.2.6:8000 on my iOS simulator, that work fine in Chrome, or from my actual phone.

Is there a new setting I need to enable for local testing? Or are there any other potential issues for me to look at?

The error I get on safari (on iOS simulator) is:

The error was: "The operation couldn't be completed. No such file or directory".

And looking in the system.log I see this:

Oct 13 16:40:46 My-MacBook-Pro MobileSafari[4215]: tcp_connection_set_tfo 89 TFO is not yet supported on Simulator
like image 299
Zach Avatar asked Oct 13 '15 20:10

Zach


People also ask

How do I find my IP address for simulator?

The simulator IP address is set with the ifconfig command which assigns an address to a network interface. netmask is the netmask corresponding to the ChorusOS sub-network, and broadcast is the broadcast address corresponding to the ChorusOS sub-network.

Does location work on iOS simulator?

How to simulate location in Simulator. To simulate location on a Simulator, select Features menu > Location, then you will see a list of location and movement options you can simulate.

How do I connect my iPhone to my watch simulator?

How do I get the watch simulator to appear when I select an iPhone simulator in Device? In the Devices window under Simulators, select an iPhone 5 and later simulator. Under the Paired Watches table, click the Add button (+).

Does CloudKit work in simulator?

CloudKit does not work with Simulator.


1 Answers

This problem solved completely with iOS 9.2 and Xcode 7.2 : https://developer.apple.com/library/content/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc7_release_notes.html#//apple_ref/doc/uid/TP40016994-CH5-SW2

However, based on official releases notes of Xcode 7.2, it is still known issue for previous iOS versions (I checked it for iOS 8.2, but there is no problem anymore). You could use your loopback address (127.0.0.1 or localhost) for older versions.

like image 54
Soheil Novinfard Avatar answered Sep 20 '22 08:09

Soheil Novinfard