用于企业应用程序的Apple App Transport Security(ATS)

时间:2016-11-10 08:14:09

标签: ios xamarin xamarin.ios app-transport-security

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

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

应用程序将托管在我们自己的服务器中,而apple不会审查企业应用程序。

更新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>

3 个答案:

答案 0 :(得分:4)

从2017年开始提交的任何Apple App Store仍然可以请求Apple审核的App Transport Security(ATS)例外。您将需要高度限制您的例外列表,不允许毯子任意http加载。审核人仍然可以拒绝您的提交并请求其他信息。

即。通过非安全通道 请求美国政府NOAA图像的应用程序可以 ,因为NOAA目前不支持这些天气雷达图像的HTTPS / SSL ....再次,向上给Apple评论员......

WKWebView,UIWebView,WebView:

  

NSAllowsArbitraryLoadsInWebContent允许你有一个严格的ATS字典,但仍然在Web视图中加载任意内容(WKWebView,UIWebView,WebView)

非安全本地网络:

  

NSAllowsLocalNetworking允许加载本地资源,而无需为应用的其余部分禁用ATS

已加密的媒体内容:

  

NSAllowsArbitraryLoadsInMedia禁用您的应用使用AV Foundation框架加载的媒体的所有ATS限制。仅使用此密钥加载已加密的媒体,例如受FairPlay或安全HLS保护的文件,且不包含个性化信息。

企业应用程序:

这些都没有得到Apple审核,因此允许禁用ATS,直到可能的未来版本的iOS不允许非安全流量,但这远非最佳做法

  • 非安全访问企业数据?

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

如果您的企业应用需要通过公共互联网获得的非安全企业资源,则可能存在超出iOS应用传输安全问题范围的安全问题。

答案 1 :(得分:-1)

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

答案 2 :(得分:-1)

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