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

Hello

 

 

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() {
        super.viewDidLoad()
        let query = PFQuery(className: "Post")
        query.findObjectsInBackground(block: { (object, error) in
            if error != nil{
                print(error)
            }else{
                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)
                        self.tableView.reloadData()
                }
            }
         
                }
         
    })
}

 

 

Thank you for your help.

 

 

Best regards Daniel

Powered by WPeMatico

About

You may also like...

Comments are closed.