Error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." Error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." ios ios

Error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."


There was no issue in the code. I guess the simulator internally was not able to connect to the internet, so that is why it was not able to connect to the server after providing various timeout intervals. But it worked completely fine when I executed another day. Thanks to @Andrew Jaffee for helping me to find this issue.


iOS Simulator -> Reset Content and Settings; worked for me


Had this problem and had a different resolution so I thought I'd add it here:

Basically, I was sending some parameters when it should have been a clean GET request. Deleted the parameters, GET request worked just fine.