I checked the syntax gazillion times here on GitHub, parse.com and elsewhere, with no luck. The problem is that when I call saveInBackgroundWithBlock for PFObject, I get the following error:
Cannot call 'saveInBackgroundWithBlock' using argument list of type '((Bool, NSError) -> Void)'
I am on Xcode 6.3 beta 2. All frameworks are loaded into the project (including Bolts and Parse, but not provided by parse.com ParseCrashReporting and ParseUI), <Parse/Parse.h> and even <Bolts/Bolts.h> displayed through the Header bridge .
var score = PFObject(className: "score") score.setObject("Rob", forKey: "name") score.setObject(95, forKey: "scoreNumber") score.saveInBackgroundWithBlock { (success: Bool!, error: NSError) -> Void in if success == true { println("Score created with ID: \(score.objectId)") } else { println(error) } }
Any thoughts?
IT gypsy
source share