如何在swift中加载localhost
伙计们,我已经创建了一个基于网络视图的ios应用程序。在启动之前,我必须测试它,但我无法在测试应用程序中加载我的本地主机 我试过这种方法如何在swift中加载localhost,swift,uiwebview,Swift,Uiwebview,伙计们,我已经创建了一个基于网络视图的ios应用程序。在启动之前,我必须测试它,但我无法在测试应用程序中加载我的本地主机 我试过这种方法 <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>192.168.0.189</key> <st
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>192.168.0.189</key>
<string></string>
<key>ExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>localhost:port</key>
<string></string>
</dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
NSAppTransportSecurity
NSExceptionDomains
192.168.0.189
例外低安全Http负载
本地主机:端口
NSAllowsArbitraryLoads
还有其他方法吗?试试这个
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>192.168.0.189</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<false/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<true/>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
<key>NSRequiresCertificateTransparency</key>
<false/>
</dict>
</dict>
</dict>
NSAppTransportSecurity
NSAllowsArbitraryLoads
NSExceptionDomains
192.168.0.189
n包括多个域
N异常低安全Http负载
NSExceptionRequiresForwardSecretary
NSExceptionMinimumTLSVersion
TLSv1.2
N第三方异常低安全Http负载
N第三方例外要求转发保密
第三方例外最小版本
TLSv1.2
NSRequiresCertificateTransparency
@StephenBalaji嗯,我编辑了我的答案。不确定你已经试过了,但如果你不试过这个。我希望它能起作用!它仍然显示白色屏幕。。如果还有别的办法,请告诉我。。感谢您的回复@User18474728