iOS Simulator can't connect to a server

41 views Asked by At

When I run my React Native project in iOS Simulator 15.2, I press a button that makes a call to an endpoint on my server, which is hosted on AWS. This gives a network error in the terminal (Error: TypeError: Network request failed)

Interestingly, the same React Native project works on my friends' machines, and they can access the server endpoints from the app. The only difference seems to be our XCode/Simulator versions (mine is 15.2, theirs is 14.3).

To be clear, the server itself is 100% fine, as I tried accessing different endpoints through Postman and it works. I tried testing on different devices within simulator, as well as rebooting my machine entirely. I still cannot access the server through the app within iOS simulator without a network error.

How can I access my server on iOS simulator?

0

There are 0 answers