AWS Cognito synchronize issue with AWSCognitoDataset iOS

301 Views Asked by At

Am getting this below error while syncing Facebook and GPlus login credentials in AWSCognitoDataset for iOS,

Task Response is :: AWSTask: 0x16018ce0; completed = YES; cancelled = NO; faulted = YES; result = (null)

Task Error is :: Error Domain=com.amazon.cognito.AWSCognitoErrorDomain Code=-4000 "(null)"

And my code is,

AWSCognito *syncClient = [AWSCognito defaultCognito];  
AWSCognitoDataset *dataset = [syncClient openOrCreateDataset:@"myDataset"];

[dataset setString:user.profile.name forKey:@"username"];
[dataset setString:user.profile.email forKey:@"email"];

[[dataset synchronize] continueWithBlock:^id(AWSTask *task) {
    // Your handler code here
    NSLog(@"Task Response is :: %@",task);

    NSLog(@"task is ::%@", task);
    if (task.isCancelled) {
        NSLog(@"task.isCancelled");
    } else if (task.error) {
        NSLog(@"Task Error is :: %@",task.error);
    } else {
        NSLog(@"Task succeeded. The data was saved in the sync store");
    }
    return nil;
}];

I cleared all my keychain and other stuffs properly as mentioned in the aws doc. It would be helpful if anyone have any idea on this. Is there any problem with AWS Cognito Syncing for iOS?

0

There are 0 best solutions below