从iOS 9(测试版)开始,Facebook的个人资料图片不再显示在FBSDKProfilePictureView
中。
这条消息被打印到日志-
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
我猜这是因为Apple的新NSAppTransportSecurity
,但添加facebook.com
域名的豁免并没有帮助。
你知道应该添加什么异常来完成这个工作吗?
原来Facebook有一个独立的内容提供商,有两个额外的域名- akamaihd.net
和akamai.net
,他们不支持TLSv1.2,也不支持前向保密。
将此添加到Project-Info中。plist——
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>1.1</string>
</dict>
<key>akamai.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>1.1</string>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>1.1</string>
</dict>
</dict>
</dict>