I sometimes get an error on iOS 8 when calling CloudCode functions. It only happens sometimes, and I have no idea why:
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
}
...
}
As Jack Cox pointed out Parse's TLS isn't up to snuff. But you just need to add an exception for the api.parse.com
domain, and the exception only needs to accept the less secure ciphers. See this Tech Note from Apple about App Transport Security.
Here's what needs to be added to your Info.plist
:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>api.parse.com</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
UPDATE: Parse sent out an email yesterday saying they'd be updating their certs on 8/11/2015, which should get rid of the need for this. I'll update my answer when that has happened.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With