2015-09-28 59 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>