Search code examples
cloudappceleratorappcelerator-titaniumappcelerator-arrow

Appcelerator Cloud Socialintegrations login error


My code is like this:

var Cloud = require("ti.cloud");

var token = Ti.Facebook.accessToken;

Ti.API.info("CLOUD EXTERNAL ACCOUNT LOGIN");

Ti.API.info("*** fb accessToken: "+token);

Cloud.SocialIntegrations.externalAccountLogin({
    type: 'facebook',
    token: token
}, function (e) {
    if (e.success) {
    }
    else {
        alert('Facebook login error: \n'+ ((e.error && e.message) || JSON.stringify(e)));
    }
}); 

I get the following errors in info

[INFO] :   CFNetwork SSLHandshake failed (-9824)
[INFO] :   CFNetwork SSLHandshake failed (-9824)
[INFO] :   CFNetwork SSLHandshake failed (-9802)
[INFO] :   CFNetwork SSLHandshake failed (-9802)
[INFO] :   NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

And the alert dialog says:

JSON parse error: Unexpected identifier "Ett"

Anyone have any idea what may be causing this?


Solution

  • This sorted out to be the same problem posted here: Appcelerator login API getting error in response Unexpected identifier

    Basically it probably has to do with iOS 9 and the SSL on the appcelerator servers for Cloud. Adding exceptions for them into the info.plist in your tiap.xml will solve the problem.

    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSExceptionDomains</key>
      <dict>
        <key>appcelerator.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>1.0</string>
            <key>NSTemporaryExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
      </dict>