Unable to register new user after logout (Swift)

I am trying to create a new user after logging out, but getting an error:

Server reported an error: FAULT = ‘3011’ [Property ‘password’ is required] <Property ‘password’ is required>

I am able to register if I restart the app. Please help.

You should set user.password property, then call UserService ‘registering’ method.

Yes, I did that. I am only getting this when I logout and try to create another user without re launching the app.

Please try TestCUserService target of sample project in attachment - it shows second login after logout.

You could run it with my Backendless app, then try with your app.

TestUserService.zip (19.55MB)

Thanks. It is working with your code, but when i try it in my app, getting the same error. Maybe I have to check my code again. Thank you.