Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse issue in Swift 3 #2718

Closed
carjo422 opened this issue Sep 16, 2016 · 3 comments
Closed

Parse issue in Swift 3 #2718

carjo422 opened this issue Sep 16, 2016 · 3 comments

Comments

@carjo422
Copy link

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!

@mtrezza
Copy link
Member

mtrezza commented Sep 16, 2016

Try replacing error: NSError? with error: Error?.

@carjo422
Copy link
Author

Awesome! This was the key to solve it!

@mtrezza
Copy link
Member

mtrezza commented Sep 17, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants