I have a Model class 'Employee'. It has the following fields:
@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
I need to pass an array of 'Employee' to the Watch app but only three fields : name, gender, designation. How do I do this? Should I create a new Model class which has only this three fields and share it between iPhone and Watch? Eg:
@interface EmployeeData : NSManagedObject
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * designation;
@property (nonatomic, retain) NSString * gender;
@end
And then should I serialise array of EmployeeData and send it as NSData to the watch?