无法在 iOS 模拟器上访问网站—'This Connection Is Not Private'
Can't visit website on iOS Simulator—'This Connection Is Not Private'
我目前正在构建一个 watch 应用程序扩展并想使用模拟器,因为它比每次都构建到我的实际 Apple Watch 更容易和更快。
但是,我 运行 遇到了模拟器问题,由于错误 'This Connection Is Not Private',我无法访问任何网站。这通常不会成为问题,除非在我的情况下我需要使用 Facebook 登录我的 iOS 并且我在那里遇到了同样的问题。使用 SFSafariViewController
:
时消息略有不同
Safari cannot open the page because it could not establish a secure connection to the server
我查看了模拟器上的 Safari 设置,看看是否有任何我可以禁用的安全措施,但一直找不到任何东西。有什么办法可以解决这个问题吗?
我目前正在使用 Xcode 9.1 和 macOS High Sierra 10.13.1
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'.
听起来您可能 运行 喜欢 App Transport Security,这需要应用程序安全地连接到服务器。在大多数情况下,您需要做的就是将您正在使用的 URL 方法从 HTTP 更改为 HTTPS。
从我的 Mac 中删除所有 反病毒 程序后,它对我有效。希望对您有所帮助。
早上好,
我在 Mac 中遇到了与 Avast 相同的问题。
您不需要删除它,只需转到设置并在您使用模拟器的同时禁用 'Web Shield' :
See image for details
如果您不想为所有网站禁用它,您可以将服务器添加到排除列表中:
See image for details
希望对您有所帮助!
问候。
我目前正在构建一个 watch 应用程序扩展并想使用模拟器,因为它比每次都构建到我的实际 Apple Watch 更容易和更快。
但是,我 运行 遇到了模拟器问题,由于错误 'This Connection Is Not Private',我无法访问任何网站。这通常不会成为问题,除非在我的情况下我需要使用 Facebook 登录我的 iOS 并且我在那里遇到了同样的问题。使用 SFSafariViewController
:
Safari cannot open the page because it could not establish a secure connection to the server
我查看了模拟器上的 Safari 设置,看看是否有任何我可以禁用的安全措施,但一直找不到任何东西。有什么办法可以解决这个问题吗?
我目前正在使用 Xcode 9.1 和 macOS High Sierra 10.13.1
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'.
听起来您可能 运行 喜欢 App Transport Security,这需要应用程序安全地连接到服务器。在大多数情况下,您需要做的就是将您正在使用的 URL 方法从 HTTP 更改为 HTTPS。
从我的 Mac 中删除所有 反病毒 程序后,它对我有效。希望对您有所帮助。
早上好,
我在 Mac 中遇到了与 Avast 相同的问题。 您不需要删除它,只需转到设置并在您使用模拟器的同时禁用 'Web Shield' : See image for details
如果您不想为所有网站禁用它,您可以将服务器添加到排除列表中: See image for details
希望对您有所帮助! 问候。