【问题标题】:air 19 & iOs 9 App Transport Securityair 19 & iOs 9 应用传输安全
【发布时间】:2016-01-02 06:43:57
【问题描述】:

我已经下载了新的 air 19 sdk 以兼容 iOs9。

我在网上发现我需要在 info.plist 中添加以下代码:

<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>facebook.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> <key>fbcdn.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> <key>akamaihd.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict>

但是,我对此一无所知,info.plist,我的项目中的文件。

现在我可以在哪里添加此代码?

我在网上找到了这个:

为 iOS 9(测试版)准备 Facebook 应用 - 文档 - 面向开发人员的 Facebook

https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/

但对我没有帮助。

谢谢

【问题讨论】:

    标签: air ios9 tls1.2 app-transport-security nsapptransportsecurity


    【解决方案1】:

    你是对的。您必须将这些行添加到您的应用程序的描述符中:

    <InfoAdditions>
        <![CDATA[
        <key>NSAppTransportSecurity</key>
        <dict>
            <key>NSExceptionDomains</key>
            <dict>
                <key>yourapiurl.com</key>
                <dict>
                    <key>NSIncludesSubdomains</key>
                    <true/>
                    <key>NSExceptionAllowsInsecureHTTPLoads</key>
                    <true/>
                </dict>
            </dict>
        </dict>
        ]]>
    </InfoAdditions>
    

    这基本上表示您希望允许在您的应用程序中调用非安全 URL。 iOS9 对所有 api 调用新请求 HTTPS。

    全文在这里:http://htmlspank.tumblr.com/post/130674234457/ioerror-2032-ios9-adobe-air-and-ats

    【讨论】:

      猜你喜欢
      • 2016-01-17
      • 2016-08-27
      • 1970-01-01
      • 2016-06-07
      • 2015-12-28
      • 2015-09-17
      • 2016-02-12
      • 2017-03-09
      • 2015-12-19
      相关资源
      最近更新 更多