2015-09-28 103 views
2

我在我的应用程序中使用了spotify sdk。在iOS中所有8是确定的,但现在,当我试图连接我的错误Spotify iOS SDK和App Transport安全性ios9

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) 

我加入这行的.plist

<key>NSAppTransportSecurity</key> 
    <dict> 
     <key>NSExceptionDomains</key> 
     <dict> 
      <key>api.spotify.com</key> 
      <dict> 
       <key>NSIncludesSubdomains</key> 
       <true/> 
       <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> 
       <true/> 
       <key>NSTemporaryExceptionMinimumTLSVersion</key> 
       <string>1.0</string> 
       <key>NSTemporaryExceptionRequiresForwardSecrecy</key> 
       <false/> 
      </dict> 
      <key>accounts.spotify.com</key> 
      <dict> 
       <key>NSIncludesSubdomains</key> 
       <true/> 
       <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> 
       <true/> 
       <key>NSTemporaryExceptionMinimumTLSVersion</key> 
       <string>1.0</string> 
       <key>NSTemporaryExceptionRequiresForwardSecrecy</key> 
       <false/> 
      </dict> 
     </dict> 
    </dict> 

但它并不能帮助。那么,任何人都可以帮助我正确配置.plist吗?谢谢!

回答

0

这应做到:

<key>NSAppTransportSecurity</key> 
<dict> 
    <key>NSExceptionDomains</key> 
    <dict> 
     <key>cloudfront.net</key> 
     <dict> 
      <key>NSIncludesSubdomains</key> 
      <true/> 
      <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key> 
      <true/> 
     </dict> 
    </dict> 
</dict>