Reputation: 4999
After I upgraded from Yosemite to El Capitan, my simulator can no longer connect to my local server. The same simulator has no problems connecting to my remote production server.
I'm sure my local server is running fine as Safari can connect to it properly using the same port.
Here's the error I'm getting in Xcode:
Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSErrorFailingURLStringKey=http://localhost:9000/sites, NSErrorFailingURLKey=http://localhost:9000/site, _kCFStreamErrorCodeKey=2, _kCFStreamErrorDomainKey=1}
I'm running xcode 7.0.1 Simulator iOS 9.0
Upvotes: 11
Views: 7819
Reputation: 5298
Using Charles can solve this problem miraculously. Just keep Charles opened, and the problem will go away.
Upvotes: 1
Reputation: 723
This is a known bug according to the Xcode 7.1 beta 3 release notes: "When running in the iOS simulator, an app cannot communicate with TCP/IP services locally hosted by the Mac. (22453539)"
Upvotes: 7
Reputation: 643
Looks like this problem persists only on simulator while real device work as expected
Upvotes: 2