In the Model portion, I have some data types whose properties are all property list data types. Eventually, users will be sending each other these data items over the network by posting to and reading from a server. The question is, should I be using NSCoding and NSKeyedArchiver (as in the second code block below, which makes ugly XML IMHO) or should I do something like subclass NSDict so I can use dictionaryWithContentsOfFile:
and writeToFile:atomically:
to get pretty XML?
@interface Word : NSObject <NSCoding>
@property (strong, nonatomic) NSString *language;
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSDictionary *detail;
@property (strong, nonatomic) NSString *userName;
@property (strong, nonatomic) NSString *userId;
@property (strong, nonatomic) NSArray *files;
- (void)copyFromTemporaryFiles:(NSArray *)temporaryFiles; // populates self.files
@end
and
@interface Category : NSObject <NSCoding>
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSDictionary *detail;
@property (strong, nonatomic) NSDate *updated;
@property (strong, nonatomic) NSArray *words;
+ (Category *)categoryWithName:(NSString *)name;
- (void)saveWithName:(NSString *)name;
@end