我在调用CloudCode函数时有时会在iOS 8上发生错误。它只是有时发生,我不知道为什么:我不知道为什么:使用iOS调用Parse.com云功能时出现SSL错误8
Error: Error Domain=Parse Code=100 "The operation couldn’t be completed. (Parse error 100.)" UserInfo=0x17ed2150
{ Code=100,
error=Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made."
UserInfo=0x19d0c750 {
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=-9824,
NSErrorFailingURLStringKey=https://api.parse.com/1/functions/weshread,
_kCFStreamErrorDomainKey=3,
NSUnderlyingError=0x19de4f40 "An SSL error has occurred and a secure connection to the server cannot be made.",
NSErrorFailingURLKey=https://api.parse.com/1/functions/weshread
}
...
}
Ack!这是禁用所有的ATS。所有你需要做的就是为“api.parse.com”添加一个异常,NSExceptionRequiresForwardSecrecy设置为false。 – aranasaurus 2015-07-29 23:11:38
同意,这是一个快速和肮脏的工作。最好的选择是游说Parse让TLSv2在他们的API上工作。 – 2015-07-30 00:22:11
我在我的Xcode 7.0/Swift 2.0项目中尝试了NSAllowsArbitraryLoads和NSExceptionRequiresForwardSecrecy;并且在尝试联系Parse.com时仍然出现SSL错误 – 2015-08-07 23:44:27