从 HTTP 迁移到 HTTPS 错误:-9801 和 -1200

moving from HTTP to HTTPS errors: -9801 and -1200

我有一个应用可以处理 http 请求,完全没问题。现在服务器已移至 https 因此我需要对 ATS 设置进行一些更改。

它给出了以下错误:

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

Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and 
a secure connection to the server cannot be made." 
UserInfo={NSLocalizedDescription=An SSL error has occurred and 
a secure connection to the server cannot be made.,
 NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, 
_kCFStreamErrorCodeKey=-9801, 
NSErrorFailingURLStringKey=https://domain.com, 
_kCFStreamErrorDomainKey=3, NSUnderlyingError=0x79094840

我试过将 Allow Arbitrary Loads 设置为 YES。但它没有用。 请告知我需要设置什么设置才能使其工作。

已通过从例外域列表中删除服务器的域来解决问题。因为它在使用 http 的例外列表中。