Hi, I setup my parse solution using Swift 2. After updating Xcode and converting to Swift 3 I get the following error on my code:
let query = PFQuery(className: "gameScore")
query.order(byDescending: "score")
query.findObjectsInBackgroundWithBlock {(objects: [PFObject]?, error: NSError?) -> Void in
Cannot convert value of type '([PFObject]?, NSError?) -Z Void' to expected argument type '([PFObject]?, NSError?) -> Void?
Anyone with any ideas on this issue??
Thanks!
Try replacing error: NSError? with error: Error?.
Awesome! This was the key to solve it!
Glad I could help :-) I suggest you post general questions regarding code migration to Swift 3 on Stackoverflow where you have a great developer community helping you out.
If you think you found a bug in parse server, have any feature suggestions or want to contribute to parse server code then this here is the place to go.
Most helpful comment
Try replacing
error: NSError?witherror: Error?.