iOS9 ATS:基于HTML5的应用程序? [英] iOS9 ATS: what about HTML5 based apps?

查看:154
本文介绍了iOS9 ATS:基于HTML5的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-DontLinkElementID_13 ,苹果力量在iOS 9中使用HTTPS over HTTP。

According to the documentation from https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-DontLinkElementID_13, Apple forces to use HTTPS over HTTP in iOS 9.


应用程序传输安全

应用程序传输安全(ATS)允许应用程序向其Info.plist文件添加声明,指定需要安全通信的域。 ATS防止意外泄露,提供安全的默认行为,并且易于采用。您应该尽快使用ATS,无论您是创建新应用还是更新现有应用。

App Transport Security (ATS) lets an app add a declaration to its Info.plist file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.

如果您正在开发新应用,则应该单独使用HTTPS。如果您有现有的应用程式,建议您尽快使用HTTPS,并尽快建立迁移应用程式其余部分的计划。

If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.

这对Web应用程序意味着什么,特别是。 Sencha Touch和Cordova / PhoneGap为基础的?我的网络应用可以配置为任何服务器地址,因此我无法在plist文件中将其列入白名单。这将只适用于使用本机请求的应用程序(通过NSURLRequest等)。

What does that mean for web applications, esp. Sencha Touch and Cordova/PhoneGap based ones? My web app can be configured to any server address, so there's no way I can whitelist them in a plist file. Will this only be applicable for applications that use native requests (via NSURLRequest etc.)?

推荐答案

如果您不确定您的应用程序将连接的URL,或者如果您连接到许多URL,您可以通过在info.plist文件中添加以下密钥来绕过ATS(App Transport Security)。

If you are not sure of which URL your application will connect or if you connect to many URLs, you can bypass the ATS (App Transport Security) by adding following keys in info.plist file.

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

这篇关于iOS9 ATS:基于HTML5的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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