graph.facebook.com - 传输安全块 [英] graph.facebook.com - Transport security block

查看:659
本文介绍了graph.facebook.com - 传输安全块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:传输安全性已阻止明文HTTP(http://)资源加载,因为它不安全。临时例外可以通过你的应用程序的Info.plist文件进行配置。

Error: Transport security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

当试图访问graph.facebook.com/ etc
我已经把
在plist上的NSAllowsArbitraryLoads

,但它一直给出这个错误。

When trying to access graph.facebook.com/ etc I already put NSAllowsArbitraryLoads
on plist, but it keeps on giving this error.

请问有什么解决方案吗?

Any solution, please?

编辑:我有这个,它不起作用。相同的错误

I have this and it isn't working. Same error

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key><true/>
    <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以包含为facebook.com提供更多条目。

You need to update your info.plist to include a few more entries for facebook.com.

来自 Facebook iOS 9迁移文档

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

这篇关于graph.facebook.com - 传输安全块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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