I am using Swift on iOS.
My application has a list of messages. You can read anonymously, but you must register to post.
When you open the application, you get an anonymous account. I added the following to AppDelegate
PFUser.enableAutomaticUser() PFUser.currentUser()?.incrementKey("RunCount") PFUser.currentUser()?.saveInBackground()
I got the code from: https://www.parse.com/docs/ios/guide#users-anonymous-users
When you go to the mail, I sign up
let user = PFUser.currentUser() user?.username = displayNameTextField.text user?.password = passwordTextField.text user?.email = emailTextField.text user!.signUpInBackgroundWithBlock { ... }
It succeeds. I can see how the user is being updated on the server. However, I get error 209: [Error]: invalid session token (code: 209, version: 1.7.4)
I tried looking at the sessiontoken and printing it at every step, and it remains the same. I heard that sessiontokens are not valid when the user logs out, but I thought I just signed up the user and did not log out. Why is sessiontoken invalid?
I tried to configure the user as the current user using PFUser.Become () using sessiontoken, but this does not work either.
I am clearly missing something, but I can't figure that out. Any help is greatly appreciated.
Christian hagel
source share