我更新瞭解析服務器以在AWS上運行,並且當我點擊重設密碼但登錄工作時出現此錯誤。我不知道爲什麼這部分代碼出現錯誤,而不是其他登錄和註冊。 Error Domain=Parse Code=1 "{"code":1,"message":"Internal server error."}" UserInfo={error={"code":1,"message":"Internal server error."}, NSLocalizedDescription={"code":1,"message":"Internal server error."}, code=1}
這是我必須重置它的代碼。解析開源服務器重置密碼錯誤
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
switch (alertView.alertViewStyle)
{
case UIAlertViewStylePlainTextInput:
{
UITextField *textField = [alertView textFieldAtIndex:0];
NSLog(@"Plain text input: %@",textField.text);
NSString *original = textField.text;
NSString *lowercase = [original lowercaseString];
NSLog(@"lowercase == %@",lowercase);
// [PFUser requestPasswordResetForEmailInBackground:@"[email protected]"];
[PFUser requestPasswordResetForEmailInBackground:lowercase block:^(BOOL succeeded, NSError * _Nullable error) {
NSLog(@"error == %@",error);
if(error){
[[[UIAlertView alloc] initWithTitle:@"Password Reset Error"
message:@"There was a Error reseting your email."
delegate:nil
cancelButtonTitle:@"ok"
otherButtonTitles:nil] show];
} else if (!error){
[[[UIAlertView alloc] initWithTitle:@"Password Reset"
message:@"An email containing information on how to reset your password has been sent to your email."
delegate:nil
cancelButtonTitle:@"ok"
otherButtonTitles:nil] show];
}
}];
}
break;
case UIAlertViewStyleSecureTextInput:
{
UITextField *textField = [alertView textFieldAtIndex:0];
NSLog(@"Secure text input: %@",textField.text);
}
break;
case UIAlertViewStyleLoginAndPasswordInput:
{
UITextField *loginField = [alertView textFieldAtIndex:0];
NSLog(@"Login input: %@",loginField.text);
UITextField *passwordField = [alertView textFieldAtIndex:1];
NSLog(@"Password input: %@",passwordField.text);
}
break;
default:
break;
}
}
謝謝你,我會確保試試這個我不知道那是什麼的電子郵件適配器確實 – Connor
我在哪裏把代碼? – Connor
@Conner:爲您編輯原始答案。 – tanz