16

I'm currently building a watch app extension and want to use the simulator because it is much easier and quicker than building to my actual Apple Watch every time.

However, I've run into a problem with the simulator where I can't visit any websites due to the error 'This Connection Is Not Private'. This wouldn't normally be a problem except in my case I need to login into my iOS using Facebook and I face the same problem there. The message is slightly different when using SFSafariViewController:

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

I have looked in the Safari settings on the simulator to see if there's any security that I can disable but have been unable to find anything. Is there any way I can get around this issue?

I'm currently using the Xcode 9.1 and macOS High Sierra 10.13.1

screenshot

Anton Belousov
  • 1,140
  • 15
  • 34
jackchmbrln
  • 1,672
  • 2
  • 14
  • 26

3 Answers3

39

It works for me after deleting all anti-virus programs from my Mac. Hope it would be helpful for you.

Joey
  • 2,912
  • 2
  • 27
  • 32
18

Good morning,

I had the same problem with Avast in my Mac. You don't need to delete it, just go to the settings and disable the 'Web Shield' meanwhile you are using the simulator: See image for details

If you don't want to disable it for all the web sites, you could add the server to the excluded list: See image for details

Hope this helps! Regards.

0

I've run into a problem with the simulator where I can't visit any websites due to the error 'This Connection Is Not Private'.

It sounds like you're probably running into App Transport Security, which requires apps to connect to servers securely. In most cases, all you need to do is change the method of the URL you're using from HTTP to HTTPS.

Caleb
  • 124,013
  • 19
  • 183
  • 272
  • Hi Caleb, thanks for your answer but this isn't the problem. My actual app already incorporates ATS and uses https for all methods. The issue is with loading anything on the simulator, for example, Facebook login in-app or if I open Safari and load https://google.co.uk then I get an error saying the connection is not private. This was never an issue before upgrading to macOS 10.13 High Sierra—from what I've found out Apple have made some changes to SSL in the new macOS which causes this problem but no-one has a solution – jackchmbrln Oct 29 '17 at 18:13