HTTPS request in iOS 9 : NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

后端 未结 6 1803
轮回少年
轮回少年 2020-12-05 15:25

I\'m updating my app to accommodate Apple\'s new ATS. Without any changes to the Plist-Info,the following code throws an error at sendSynchronousRequest() in a

6条回答
  •  粉色の甜心
    2020-12-05 15:52

    I added this code in the info.plist to allow any request http:

     NSAppTransportSecurity
    
        NSAllowsArbitraryLoads
        
    
    

    This article lists all the changes made by Apple for iOS 9 and their implementations:

    http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/

提交回复
热议问题