0

I added a new column to my user information so I decided to delete all the current users so that I could recreate them with the new information. Now even though it is telling me in the code that the user has been saved in the background it is nowhere to be found in the User class in Parse.com This is my code

    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);

    }

}

Is there anything I am doing wrong? It was working fine 15 minutes ago. I do not know what has happened. Please help Thanks

1 Answer 1

1

I think the spacing with "gender" might be generating the error.

Sign up to request clarification or add additional context in comments.

1 Comment

Ok so I figured out my issue. I set the new column as a Number not a String. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.