NSURLSession/NSURLConnection HTTP load failed on iOS 9

前端 未结 13 1032
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 05:20

Tried to run my existing app on iOS9 but getting failure while using AFURLSessionManager.

__block NSURLSessionDataTask *task = [self.sessionMana         


        
13条回答
  •  名媛妹妹
    2020-11-22 06:05

    Apple's Technote on App Transport Security is very handy; it helped us find a more secure solution to our issue.

    Hopefully this will help someone else. We were having issues connecting to Amazon S3 URLs that appeared to be perfectly valid, TLSv12 HTTPS URLs. Turns out we had to disable NSExceptionRequiresForwardSecrecy to enable another handful of ciphers that S3 uses.

    In our Info.plist:

    NSAppTransportSecurity
    
      NSExceptionDomains
      
        amazonaws.com
        
          NSIncludesSubdomains
          
          NSExceptionRequiresForwardSecrecy
          
        
      
    
    

提交回复
热议问题