Created
October 20, 2014 06:41
-
-
Save toast38coza/e663bfbdd1c96c7c7969 to your computer and use it in GitHub Desktop.
Save a class to parse with swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## you need to create a bridging header: ParseExample-Bridging-Header.h | |
## #import <Parse/Parse.h> | |
Parse.setApplicationId("...", clientKey: "...") | |
var person = PFObject(className:"Person") | |
person.setObject("Joe", forKey: "firstname") | |
person.saveInBackgroundWithBlock{ | |
(success: Bool!, error: NSError!) -> Void in | |
if success == true { | |
println("Created: \(person.objectId)") | |
} else { | |
println(error) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment