Hello,
I’ve been trying to register a user from my app but I seem to always get an error, although a few days ago it would work perfectly, now it doesn’t…
func Register(email:String, username:String, password:String, age:String, gender:String, profilePicture:UIImage?){
newUser.email = email
newUser.password = password
newUser.setProperty("username", object: username)
newUser.setProperty("age", object: age)
newUser.setProperty("gender", object: gender)
backendless.userService.registering(newUser, response: { (user:BackendlessUser!) in
self.loginUser(username, password: password)
}) { (fault:Fault!) in
print("Registering Failed. \(fault)")
}
That function gets called when the user clicks a button, but I’ve noticed that if I call that function from viewDidLoad() the user registers with no errors… I even tried hardcoding the username, password, and all the fields but nothing seems to work…
Any type of help is highly appreciated.
Thank you!