Appcelerator login API getting error in response Unexpected identifier

此生再无相见时 提交于 2019-12-24 01:36:08

问题


I am using Appcelerator iCloud·Cloud.Users.login·API its callback is giving me following response:

{"success":false,"error":true,"message":"JSON Parse error: Unexpected identifier \"An\""}

I am stuck on the things and not able to move forward, Our live App users on App Store are also affected from this.

Problem comes when we open Appcelerator Titanium project from Xcode and build the app from there and run on iOS simulator or device.

Here is the code which I am using:

Cloud.Users.login({
    login : userId,
    password : password,
}, function(e) {
    //alert(e);
    Ti.API.info("In success ....Cloud.Users.login..");
    Ti.API.info('response from login service'+JSON.stringify(e));
    if (e.success) {
        Ti.API.info('User successfully login');
    } else if (e.error) {
        Ti.API.info(e.message);
        _activityIndicator.hide();
        alertWin.close();           
    }
    //button.show();
});

In my case its going in else part because of response which I provided "success":false in the JSON which I am getting in callback function from Appcelerator cloud API.

Help me to resolve this error I am getting in callback.

来源:https://stackoverflow.com/questions/36521273/appcelerator-login-api-getting-error-in-response-unexpected-identifier

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!