App Transport Security在iOS 11 Xcode 9上不再起作用 [英] App Transport Security does not work any more with iOS 11 Xcode 9

查看:95
本文介绍了App Transport Security在iOS 11 Xcode 9上不再起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发应用程序...由于禁用ATS的iOS 11更新不再起作用,因此我在info.plist中添加了以下内容

I've been working on an app...since the iOS 11 update disabling ATS does not work anymore I've added the below in the info.plist

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

从未知域下载图像时,我无法使用域异常键. 以下是我尝试下载图片时得到的内容

I can't use the domain exception key as I am downloading images from unknown domains. below is what I get when trying to download an image

Task <C3DC30F1-5869-46F6-ABA4-5E1EC8334FD8>.<0> HTTP load failed (error code: -1005 [4:-4])
NSURLConnection finished with error - code -1005

推荐答案

我知道IOS 11不再支持以下内容:

I am aware that IOS 11 not longer supports the following:

  • RC4 3DES-CBC AES-CBC
  • MD5 SHA-1
  • < 2048位RSA发布密钥-与服务器的所有TLS连接
  • http://
  • SSLv3
  • TLS 1.0
  • TLS 1.1

添加以下内容,我们可以绕过ATS(应用程序传输安全性)错误:

Adding the following we can bypass the ATS (App Transport Security) error:

<key>NSAppTransportSecurity</key> <dict>
     <key>NSExceptionDomains</key>
     <dict>
         <key>mydomain.com</key>
         <dict>
             <!--Include to allow subdomains-->
             <key>NSIncludesSubdomains</key>
             <true/>
             <key>NSExceptionRequiresForwardSecrecy</key>
             <false/>
         </dict>
     </dict> </dict>

参考链接: iOS 11 ATS(应用程序传输安全性)不再接受自定义锚证书吗?

这篇关于App Transport Security在iOS 11 Xcode 9上不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆