2

在 iOS 的 AWSCognitoDataset 中同步 Facebook 和 GPlus 登录凭证时出现以下错误,

任务响应是 :: AWSTask: 0x16018ce0; 完成=是;取消=否;故障=是;结果=(空)

任务错误是 :: Error Domain=com.amazon.cognito.AWSCognitoErrorDomain Code=-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 同步有什么问题吗?

4

0 回答 0