Reputation: 5383
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
}
...
}
Upvotes: 6
Views: 846
Reputation: 345
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.
Upvotes: 4
Reputation: 3300
It appears that the Analytics servers do not support TLSv2 yet. To temporarily work around this you need tell the iOS 9 app that it should do insecure connections.
Add the following entry to the info.plist file for your app:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Upvotes: 0