适用于企业应用程序的 Apple App 传输安全 (ATS)

Apple App Transport Security (ATS) for Enterprise Application

我正在开发企业应用程序。到目前为止,一切都在模拟器中运行良好,但当我将它部署到物理设备上时,它崩溃了。发生崩溃是因为应用程序通过 "HTTP" 而不是 "HTTPS" 连接到 Web 服务。

我在 info.plist 文件中添加了 ATS 例外。我需要知道企业应用程序将在 2016 年(Apple 的截止日期)之后继续使用 HTTP

应用程序将托管在我们自己的服务器上,苹果不审核企业应用程序。

更新 1 我只需要知道企业应用程序在 2016 年之后是否会继续使用此 ATS 例外情况?

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDisplayName</key>
    <string>xxxxxxxx</string>
    <key>CFBundleIdentifier</key>
    <string>com.xxxxxxx.xxx</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1.009</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MinimumOSVersion</key>
    <string>9.0</string>
    <key>UIDeviceFamily</key>
    <array>
        <integer>2</integer>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIMainStoryboardFile~ipad</key>
    <string>Main</string>
    <key>UIAppFonts</key>
    <array>
        <string>Fonts/Montserrat-Black.otf</string>
        <string>Fonts/Montserrat-Bold.otf</string>
        <string>Fonts/Montserrat-ExtraBold.otf</string>
        <string>Fonts/Montserrat-Regular.otf</string>
    </array>

  <key>NSAppTransportSecurity</key>
  <dict>
    <key>NSExceptionDomains</key>
    <dict>
      <key>http://xxxxxxx.xxxxx.xxx</key>
      <dict>
        <key>NSExceptionMinimumTLSVersion</key>
        <string>TLSv1.0</string>
        <key>NSExceptionRequiresForwardSecrecy</key>
        <false/>
        <key>NSExceptionAllowsInsecureHTTPLoads</key>
        <true/>
        <key>NSIncludesSubdomains</key>
        <true/>
      </dict>
    </dict>
  </dict>

</dict>

尝试允许 ATS 下的任意负载。

有很多应用程序使用 HTTP,我的意思是现在没有 ssl,所以除了 ssl 可以添加的安全性之外,这不是担心的问题。但是将来如果苹果在没有 sslhttps 的情况下完全限制 web 服务,那么你和每个人都必须在服务器中配置 ssl,现在没有人可以肯定地说它会在 2016 年之后工作或不!现在您可以使用 hhtp!

从 2017 年开始的任何 Apple App Store 提交仍然可以请求 App Transport Security (ATS) 例外,Apple 将对其进行审查。您将需要高度限制您的例外列表,并且不允许一揽子任意 http 加载。审稿人仍然可以拒绝您的提交并要求提供更多信息。

即通过非安全通道请求美国政府 NOAA 图像的应用程序 可能 被允许,因为 NOAA 目前不支持 HTTPS/SSL 这些气象雷达图片....再次,由 Apple 审阅者决定...

WKWebView、UIWebView、WebView:

NSAllowsArbitraryLoadsInWebContent lets you have a strict ATS dictionary but still load arbitrary content in a web view (WKWebView, UIWebView, WebView)

非安全本地网络:

NSAllowsLocalNetworking allows loading of local resources without disabling ATS for the rest of your app

已加密的媒体内容:

NSAllowsArbitraryLoadsInMedia disables all ATS restrictions for media that your app loads using the AV Foundation framework. Employ this key only for loading media that are already encrypted, such as files protected by FairPlay or by secure HLS, and that do not contain personalized information.

企业应用程序:

这些不会让 Apple 审查,因此允许禁用 ATS,直到 iOS 可能的未来版本将禁止非安全流量,但这远非最佳实践

  • 企业数据访问不安全?

如果您的企业应用程序需要基于本地网络的非安全资源,请改用新的 NSAllowsLocalNetworking 例外。

如果您的企业应用程序需要通过 public 互联网获得的非安全企业资源,您可能会遇到超出 iOS 应用程序传输安全问题范围的安全问题。