The Parse documentation for adding properties and methods on PFObject subclasses conveniently skips the Swift syntax in their sample code listing just the Objective-C syntax
I ran into the same issue, though I should note that your class definition should look more like this:
class Armor : PFObject, PFSubclassing {
var displayName: String
class func parseClassName() -> String! {
return "Armor"
}
}
var armor = Armor()
armor.displayName = "Iron Clad"
I tried a few different things without success. It doesn't look like the Parse SDK supports this yet, keep in mind that the current release of the Parse iOS SDK predates the swift announcement. Sounds like they're working on better swift support for an upcoming release though.
Instead, you can still create PFObject subclasses (as you did) and access data with .getObjectForKey("displayName"), or write your own class methods to access this data. The biggest missing piece is really just some convenience methods that the SDK usually creates for you.