How do I access the host machine itself from the iPhone simulator
The iOS Simulator uses the host machine network so you should be able to just use localhost or your machines IP address, whichever IP your web service is listening on.
In swift 5 just call:
http://localhost:<port>/file_path
but you will need to add this part to the project Info.plist
.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Otherwise this error is going to happen.
Cannot start load of Task <xx-xx>.<x> since it does not conform to ATS policy.