我在我的用户信息中添加了一个新列,因此我决定删除所有当前用户,以便我可以使用新信息重新创建它们。现在即使它在代码中告诉我用户已经保存在后台,也无法在Parse.com的User类中找到它。 这是我的代码
let userName = userNameTextField.text;
let userEmail = userEmailTextField.text;
let userGender = userGenderTextField.text;
let userPassword = userPasswordTextField.text;
let userRepeatPassword = userRepeatPasswordTextField.text;
let userPhoneNumber = PhoneNumberTextField.text;
// Store data
let SpotterAccount:PFUser = PFUser();
SpotterAccount.username = userName
SpotterAccount.email = userEmail
SpotterAccount.password = userPassword
SpotterAccount[ "gender" ] = userGender
SpotterAccount["phonenumber"] = userPhoneNumber
SpotterAccount.signUpInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
println("Spotter Account succesfully created")
// Display alert message with confirmation
var Alert = UIAlertController(title: "Congradulations!", message: "Your Spotter Account has been created", preferredStyle:UIAlertControllerStyle.Alert);
let okAction = UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default){
action in
self.dismissViewControllerAnimated(false, completion: nil);
}
Alert.addAction(okAction);
self.presentViewController(Alert, animated:true, completion:nil);
}
}
我做错了什么吗?它在15分钟前工作正常。我不知道发生了什么。请帮忙 感谢
答案 0 :(得分:1)
我认为与“性别”的间距可能会产生错误。