I am trying to pass an array of iPhone Employee objects to an Apple Watch by serializing the array:
NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:employees];
and non-esterizing it, as on the Watch side:
NSMutableArray *employees = [NSKeyedUnarchiver unarchiveObjectWithData:encodedObject];
This is the Employee class:
@interface Employee : NSManagedObject
@property (nonatomic, retain) NSNumber * employeeID;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSNumber * age;
@property (nonatomic, retain) NSString * address;
@property (nonatomic, retain) NSString * designation;
@property (nonatomic, retain) NSString * teamName;
@property (nonatomic, retain) NSString * gender;
@property (nonatomic, retain) NSNumber * dateOfJoining;
@end
Do I have to make any changes to the Side Watch to fix this error?
source
share