NSMutableArray * array;
array = [NSKeyedUnarchiver unarchiveObjectWithFile: mypath];
it is OK.
NSData * data = [NSData dataWithContentsOfFile: mypath];
array = [NSKeyedUnarchiver unarchiveObjectWithData: data];
it is OK.
The method I can't use is:
+ UnarchivedObjectOfClass:``` from Date: error:
@interface Magazzino: NSObject <NSCoding> {
NSNumber * num;
NSString * description;
NSString * um;
NSNumber * price list;
NSNumber * discount;
NSNumber * cost;
NSNumber * price increase;
}
NSMutableArray * array;
array = [NSKeyedUnarchiver unarchivedObjectOfClass: Magazzino.class fromData: data error: & error];
Error Domain = NSCocoaErrorDomain Code = 4864 "value for key 'root' was of unexpected class' NSMutableArray '. Allowed classes are' {( Magazzino