解析 - 跳过回调函数

时间:2015-01-01 19:06:47

标签: ios callback parse-platform

我目前在解析时遇到了一些问题。我认为解析会跳过每个回调。

user.password = _textfeld_Passwort.text;
user.email = _textfeld_email.text;

NSLog(@"next: signUp");

[user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
    NSLog(@"signUp started");
    if (!error) {
        NSLog(@"no error!");
        if (succeeded) {
            NSLog(@"succes");
            UIAlertView *succes = [[UIAlertView alloc] initWithTitle:@"Erfolgreich!" message:@"Registrierung abgeschlossen! Bitte bestätige den Link in der Email, die wir an dich gesendet haben! Und logge dich dann ein!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
            [succes show];

            [self initialerStundenplan];

            NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
            [defaults setBool:YES forKey:@"registriert"];
            [defaults setObject:_textfeld_Username.text forKey:@"Username"];
            [defaults setObject: Stufe_temp forKey:@"Stufe"];
            [defaults setObject:_textfeld_Passwort.text forKey:@"Passwort"];

            [defaults synchronize];
            _button_Login.hidden = NO;
            [self viewDidLoad];
        } else {
            NSLog(@"no succes!");
            UIAlertView *fail = [[UIAlertView alloc] initWithTitle:@"Fehlgeschlagen!1" message:@"Bitte versuche es erneut!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
            [fail show];
        }
    } else {
        NSLog(@"error!");
        UIAlertView *fail = [[UIAlertView alloc] initWithTitle:@"Fehlgeschlagen!2" message:@"Bitte versuche es erneut!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [fail show];
    }
}];
NSLog(@"completed / skipped");

}

我已经建立了一些输出。这是控制台输出:

2015-01-01 20:01:05.901 Vertretungsplan[5535:2195125] next: signUp
2015-01-01 20:01:05.905 Vertretungsplan[5535:2195125] completed / skipped

所以有人能说出我做错了什么或者它是一个Parse bug吗?我正在使用Parse iOS SDK 1.6.1。

0 个答案:

没有答案