user6520705 user6520705 - 6 months ago 136
iOS Question

Parse Xcode 8 and swift 3 CompletianHandler error

I updated to xcode 8 and my code was updated to swift 3. Now i get errors wherever i used blocks inside my code with Parse. Here is one example

query.findObjectsInBackground { (objects:[PFObject]?, error:NSError?)' in

this gives the error cannot convert value of type '([PFObject]?, NSError?) ->()
to expected argument type '([PFObject]?, Error?) -> Void?'


Try this:

query.findObjectsInBackground { (objects:[PFObject]?, error:Error?)' in