Xamarin.Auth iOS9 Authentication SSL ERROR

瘦欲@ 提交于 2019-12-05 11:10:01
Ziba Leah

To Fix this problem, simply add to your Info.plist file these lines:

<key>NSAppTransportSecurity</key>
  <dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<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>

If you don't care about extra rules for domains, you can simply add:

 <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>

NOTE: you have to Clean and Rebuild the project in order to see it running with these new settings!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!