2015-09-21 25 views
1

在iOS版9我的UIWebView裝公司的Facebook頁面僅與NSAllowsArbitraryLoads按鍵努力YES,otherwhise結果如下錯誤:NSAppTransportSecurity和Facebook

NSURLSession/NSURLConnection的HTTP加載失敗(kCFStreamErrorDomainSSL,-9802)

任何消耗?

回答

4

打開Info.plist文件的源代碼,並確保「NSAppTransportSecurity」鍵看起來像這樣(在https://developers.facebook.com/docs/ios/ios9更多信息)

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

非常感謝你爲你的時間,通過它的工作兩種方式twitter和youtube –