• <small id='U0851'></small><noframes id='U0851'>

      <legend id='U0851'><style id='U0851'><dir id='U0851'><q id='U0851'></q></dir></style></legend>
      <tfoot id='U0851'></tfoot>

        • <bdo id='U0851'></bdo><ul id='U0851'></ul>

        <i id='U0851'><tr id='U0851'><dt id='U0851'><q id='U0851'><span id='U0851'><b id='U0851'><form id='U0851'><ins id='U0851'></ins><ul id='U0851'></ul><sub id='U0851'></sub></form><legend id='U0851'></legend><bdo id='U0851'><pre id='U0851'><center id='U0851'></center></pre></bdo></b><th id='U0851'></th></span></q></dt></tr></i><div id='U0851'><tfoot id='U0851'></tfoot><dl id='U0851'><fieldset id='U0851'></fieldset></dl></div>

        Swift UIWebView 不加载 http 网站

        Swift UIWebView not loading http sites(Swift UIWebView 不加载 http 网站)
        <tfoot id='vrcqa'></tfoot>

      1. <small id='vrcqa'></small><noframes id='vrcqa'>

          <bdo id='vrcqa'></bdo><ul id='vrcqa'></ul>

          <i id='vrcqa'><tr id='vrcqa'><dt id='vrcqa'><q id='vrcqa'><span id='vrcqa'><b id='vrcqa'><form id='vrcqa'><ins id='vrcqa'></ins><ul id='vrcqa'></ul><sub id='vrcqa'></sub></form><legend id='vrcqa'></legend><bdo id='vrcqa'><pre id='vrcqa'><center id='vrcqa'></center></pre></bdo></b><th id='vrcqa'></th></span></q></dt></tr></i><div id='vrcqa'><tfoot id='vrcqa'></tfoot><dl id='vrcqa'><fieldset id='vrcqa'></fieldset></dl></div>
            <tbody id='vrcqa'></tbody>

              <legend id='vrcqa'><style id='vrcqa'><dir id='vrcqa'><q id='vrcqa'></q></dir></style></legend>
                1. 本文介绍了Swift UIWebView 不加载 http 网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我创建了一个 Web 视图控制器,它加载 https 站点(例如:、)但不加载 http、非 ssl 安全站点(例如:http://bswd.us,http://www.barretthillins.com).当我在其中放置一个 hhtp 站点时,它确实会加载,但只是一个空白的白色 Web 视图.我需要如何解决这个问题?

                  I created a web view controller and it loads https sites(ex: , ) but not http, non ssl secured sites(ex: http://bswd.us, http://www.barretthillins.com). When i do put a hhtp site in there, it does load but just a blank, white web view. How would i need to fix this?

                  推荐答案

                  这是由于 Apple 在 WWDC 2015 上引入的新协议 App Transport Security.它不允许任何非 HTTPS 的连接.您可以禁用它,但不建议这样做,因为它会保护您的应用.

                  This is due to the App Transport Security, a new protocol introduced by Apple at WWDC 2015. It doesn't allow any connections that are not HTTPS. You can disable it, however it's not recommended as it secures your app.

                  要禁用它,您必须编辑应用程序的 .plist.只需右键单击 .plist 文件并选择 Open As -> Source File 并添加以下代码:

                  To disable it you have to edit the App's .plist. Simply right-click the .plist file and select Open As -> Source File and add the following code:

                  <key>NSAppTransportSecurity</key>
                  <dict>
                      <key>NSAllowsArbitraryLoads</key><true/>
                  </dict>
                  

                  这将允许 HTTP 请求.

                  希望对您有所帮助,朱利安.

                  Hope that helps, Julian.

                  这篇关于Swift UIWebView 不加载 http 网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                  How to get indexPath.row of tableView which is currently being displayed?(如何获取当前正在显示的 tableView 的 indexPath.row?)
                  Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)

                    • <bdo id='Ac8to'></bdo><ul id='Ac8to'></ul>

                        <tfoot id='Ac8to'></tfoot>

                        <i id='Ac8to'><tr id='Ac8to'><dt id='Ac8to'><q id='Ac8to'><span id='Ac8to'><b id='Ac8to'><form id='Ac8to'><ins id='Ac8to'></ins><ul id='Ac8to'></ul><sub id='Ac8to'></sub></form><legend id='Ac8to'></legend><bdo id='Ac8to'><pre id='Ac8to'><center id='Ac8to'></center></pre></bdo></b><th id='Ac8to'></th></span></q></dt></tr></i><div id='Ac8to'><tfoot id='Ac8to'></tfoot><dl id='Ac8to'><fieldset id='Ac8to'></fieldset></dl></div>
                      1. <small id='Ac8to'></small><noframes id='Ac8to'>

                          <tbody id='Ac8to'></tbody>
                        • <legend id='Ac8to'><style id='Ac8to'><dir id='Ac8to'><q id='Ac8to'></q></dir></style></legend>