• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

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

[复制链接]
菜鸟教程小白 发表于 2022-12-12 22:47:47 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我正在开发一个企业应用程序。到目前为止,一切都在模拟器中运行良好,但是当我将它部署在物理设备上时它崩溃了。发生崩溃是因为应用程序通过“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>



Best Answer-推荐答案


从 2017 年开始,任何 Apple App Store 提交的内容仍可申请应用传输安全 (ATS) 异常(exception),Apple 将对其进行审核。您将需要高度限制您的异常(exception)列表,并且不允许一揽子任意 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 的审查,因此在未来可能的 iOS 版本禁止非安全流量之前,允许禁用 ATS,但这远非最佳实践

  • 企业数据访问不安全?

如果您的企业应用需要基于本地网络的非安全资源,请改用新的 NSAllowsLocalNetworking 异常(exception)。

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

关于ios - 适用于企业应用程序的 Apple App Transport Security (ATS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40522749/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap