Titanium 如何在Appcelerator中设置应用程序传输安全性

Titanium 如何在Appcelerator中设置应用程序传输安全性,titanium,appcelerator,titanium-mobile,appcelerator-titanium,nsapptransportsecurity,Titanium,Appcelerator,Titanium Mobile,Appcelerator Titanium,Nsapptransportsecurity,我正在尝试配置应用程序传输安全性,但我总是从安全扫描中得到一个未正确配置的响应。我正在为iOS使用Appcelerator SDK 7.0.1 扫描结果: App Transport Security App Transport Security (ATS), which is a networking security feature that ensures network connections employ the most secure protocols and ciphers, w

我正在尝试配置应用程序传输安全性,但我总是从安全扫描中得到一个未正确配置的响应。我正在为iOS使用Appcelerator SDK 7.0.1

扫描结果:

App Transport Security
App Transport Security (ATS), which is a networking security feature that ensures network connections employ the most secure protocols and ciphers, was found to be misconfigured.

NSAllowsArbitraryLoads set YES
这是我的tiapp.xml的一部分

<property name="ios.whitelist.appcelerator.com" type="bool">false</property>
<ios>
    <enable-launch-screen-storyboard>true</enable-launch-screen-storyboard>
    <use-app-thinning>true</use-app-thinning>
    <plist>
        <dict>
            <key>UISupportedInterfaceOrientations~iphone</key>
            <array>
                <string>UIInterfaceOrientationPortrait</string>
            </array>
            <key>UISupportedInterfaceOrientations~ipad</key>
            <array>
                <string>UIInterfaceOrientationPortrait</string>
                <string>UIInterfaceOrientationPortraitUpsideDown</string>
            </array>
            <key>UIRequiresPersistentWiFi</key>
            <false/>
            <key>UIPrerenderedIcon</key>
            <false/>
            <key>UIStatusBarHidden</key>
            <false/>
            <key>UIStatusBarStyle</key>
            <string>UIStatusBarStyleDefault</string>
            <key>NSAppTransportSecurity</key>
            <dict>
                <key>NSAllowsArbitraryLoads</key>
                <true/>
            </dict>
        </dict>
    </plist>
</ios>
false
真的
真的
UI支持接口方向~iphone


我做错了什么?提前感谢您的帮助。

我们需要将NSAllowsArbitraryLoads密钥设置为“否”,以启用ATS并消除安全警告


我认为文件是错误的。我已经在github上提交了一个CR来更新文档页面。

NSAllowsArbitraryLoads
设置为
true
禁用ATS,这意味着将允许所有URL,并且未配置任何限制。这是默认情况下在Tianium中的配置方式,以确保升级到较新SDK版本的应用程序的向后兼容性。可以覆盖它以指定允许的域(白名单)或通过禁用
NSAllowsArbitraryLoads

正如Nirman所指出的,文档仍然不正确,所以我只是(因为我找不到前面提到的pull请求)