Alright so i'm starting to get a headache here... Once my user sign onto my app i create a new class on parse with the name PFUser.Current()?.objectId! Within this class i store all the users information, and the user can acces it from any device since his user ID never changes. One of the things i store in the user class is an array which leads me to my question: I want to be able to acces this array but the only way this can be done is by using:
var query = PFQuery(className: "\(PFUser.current()?.objectId!)") // Calling the user class
query.getObjectInBackground(withId: "") { (object: PFObject?, error: Error?) in
if error != nil {
print(error)
} else {
print(object)
}
}
The Problem is that i do not know how to retrieve the objectID from within the class UserObjectID.
I found some code that lets me retrieve my user list and append usernames and iDs to an array:
var query = PFUser.query()
query?.findObjectsInBackground { (objects, error) in
if let users = objects {
for object in users {
if let user = object as? PFUser {
self.usernames.append(user.username!)
self.userids.append(user.objectId!)
}
}
}
}
How can i do a similar search, and find all the objectIDs within my individual userClass instead of the superUser class?