iOS simulator can't access any URL and shows t

2019-05-31 09:29发布

问题:

I've encountered a problem where my iPhone Simulator can't access any of the websites on SAFARI. I am also unable to call any API from my application.

The error shown by SAFARI is either of the two mentioned below: "This connection is not private"

Refer Screenshot

OR

"Safari cannot open the page because it could not establish a secure connection to the server"

Refer Screenshot

I have done some research on this issue and have come across a few different solutions. But all of them suggest me to:

  • Uncheck "web-sheilding" in my anti-virus software; OR
  • Turn on the "Allow HTTP Loads" in Simulator>Settings>Developer; OR
  • "Erase content and settings" and restart the simulator

None of these solutions are working for me. Could anyone suggest what the problem here might be?

I'm using Xcode v9.2 and Simulator with iOS11.2.