zoukankan      html  css  js  c++  java
  • AFNetworking 提示"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection" 解决办法

    原因:iOS9以后,苹果把原http协议改成了https协议,所以不能直接在http协议下GET/POST

    解决方案之一:

    直接编辑工程文件下的Info.plist文件,加入以下代码

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

    如图所示:

    解决方案之二:

    a.在Xcode里选中info.plist,点击右边的information Property List 后边的加号

    b.写入App Transport Security Settings然后回车,先点击左侧展开箭头,再点右侧加号,Allow Arbitrary Loads 已经自动生成,直接回车。

    c.需要把默认的值改成YES

    其实效果是一样的,打开info.plist文件,发现方案一中的文字已经自动添加

  • 相关阅读:
    veil-evasion免杀处理
    对程序"加料"
    堆栈溢出
    ICMP隧道 ptunnle
    socat流量操控
    DNS隧道 iodns
    dns隧道 dns2tcpd
    ssh X协议转发
    ssh动态端口转发
    ssh远程端口转发
  • 原文地址:https://www.cnblogs.com/36bian/p/5237138.html
Copyright © 2011-2022 走看看