Appcelerator Cloud Socialintegrations登录错误

时间:2016-04-19 09:05:39

标签: cloud appcelerator appcelerator-titanium appcelerator-arrow

我的代码是这样的:

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)));
    }
}); 

我在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)

警告对话框显示:

JSON parse error: Unexpected identifier "Ett"

任何人都知道造成这种情况的原因是什么?

1 个答案:

答案 0 :(得分:1)

这个问题与此处发布的问题相同: Appcelerator login API getting error in response Unexpected identifier

基本上它可能与iOS 9以及适用于Cloud的appcelerator服务器上的SSL有关。将它们的例外添加到tiap.xml的info.plist中将解决问题。

<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>