FAULT = '3011' [Property 'password' is required] (iOS SWIFT)

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!

What kind of error do you get ?

FAULT = ‘3011’ [Property ‘password’ is required]
The app crashes as well…

Though password is not nil

Thank you!

Moussa, please, provide your appId here or to support@backendless.com, we will investigate this issue with your app.

The email has been sent

Thanks!

Hi Moussa,

I cannot reproduce this issue with your code and app.
I have created a sample with your code:
http://support.backendless.com/public/attachments/264f7d0a70c89cb825ee4ddaac578d54.png</img>
and run it. Here is log
http://support.backendless.com/public/attachments/4e10c6b760aecf2279396d2d456b171b.png</img>
and a result in your app console:
http://support.backendless.com/public/attachments/f1a8130b886b2f04cafa78b2ea989b09.png</img>

Regards,
Slava

Okay, I’ll see what I’ll need to do.

Thank you!

did u manage to solve this one?? whats the solution