Appcelerator login API getting error in response Unexpected identifier

280 Views Asked by At

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.

0

There are 0 best solutions below