Can't visit website on iOS Simulator—'This

2019-03-18 12:30发布

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

3条回答
ら.Afraid
2楼-- · 2019-03-18 12:41

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.

查看更多
一纸荒年 Trace。
3楼-- · 2019-03-18 12:58

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.

查看更多
时光不老,我们不散
4楼-- · 2019-03-18 12:59

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

查看更多
登录 后发表回答