1

I am making a Swift iOS app using Parse.

An existing user needs to be able to enter their email address (which will be their username) and then the updatedAt information will be displayed.

How do setup the PFUser.Query() to create a variable to store the relevant updatedAt information.

Basically I want to say: If entered email address equals existing email address then display the updatedAt information.

Thank you!

1 Answer 1

2
// First get user's inputted email
let enteredEmailAddress = "[email protected]"

// Then query and compare
var query = PFQuery(className: "_User")
query.whereKey("email", equalTo: enteredEmailAddress)
query.findObjectsInBackgroundWithBlock { (objects: [AnyObject]!, error: NSError!) -> Void in
    if error == nil {
        println(objects[0].updatedAt)
    }
}
Sign up to request clarification or add additional context in comments.

Comments

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.