FAQ Database Discussion Community


Custom class archiving in Swift

ios,swift,nskeyedarchiver,nskeyedunarchiver
I would like to archive and unarchive a custom object in swift, something like this: class Line : NSObject, NSCoding { var start : CGPoint init(start _start: CGPoint) { start = _start } required init(coder aDecoder: NSCoder) { // 1 - compile time error self.start = aDecoder.decodeObjectForKey("start") as CGPoint }...

NSKeyedUnarchiver unarchiveObjectWithData: in Parse block function never returns

ios,parse.com,nskeyedunarchiver
I am requesting a file representation of an NSDictionary from Parse.com (yes I know there are other more obvious ways to store dictionaries) and then in the completion block the data gets unarchived and assigned to a property. When this code executes it never seems to return from the unarchive...