mark this question as solved quesstion apples ios parse query xcode for text and images by the user app




I’m trying to create my first app using xcode.


This fails I on the parse query for text and images.


How should I write the query, that the images and text from the user registered in the app is displayed.


That I cobbled together and work not just as planned.


override func viewDidLoad() {
        let query = PFQuery(className: "Post")
        query.findObjectsInBackground(block: { (object, error) in
            if error != nil{
                if let posts = object {
                    for post in posts {
                    query.whereKey("imageFile", equalTo: self.imageFile)
                    query.whereKey("message", equalTo: self.comments)
                    query.getObjectInBackground(withId: "post")
                        self.comments.append(post["message"] as! String)
                        self.imageFile.append(post["imageFile"] as! PFFile)



Thank you for your help.



Best regards Daniel

Powered by WPeMatico


You may also like...

Comments are closed.