AWS Cognito与AWSCognitoDataset iOS同步问题

时间:2017-07-13 06:15:13

标签: objective-c amazon-web-services aws-cognito aws-sdk-ios aws-ios

在适用于iOS的AWSCognitoDataset中同步Facebook和GPlus登录凭据时,会出现以下错误,

任务响应是:: AWSTask:0x16018ce0;完成=是;取消=否;出错=是; result =(null)

任务错误:: 错误域= com.amazon.cognito.AWSCognitoErrorDomain代码= -4000"(null)"

我的代码是,

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

我清理了所有钥匙串和其他东西,正如aws doc中提到的那样。如果有人对此有任何想法会很有帮助。适用于iOS的AWS Cognito Syncing是否有任何问题?

0 个答案:

没有答案