I currently have a Video object created via Core Data defined as:
Video .h
#import <CoreData/CoreData.h>
@interface Video : NSManagedObject
{
}
@property (nonatomic, retain) NSString * title;
@property (nonatomic, retain) NSString * urlImage;
@property (nonatomic, retain) NSString * description;
@property (nonatomic, retain) NSString * urlString;
@end
and Video.m:
#import "Video.h"
@implementation Video
@dynamic title;
@dynamic urlImage;
@dynamic description;
@dynamic urlString;
@end
I need my app to create an NSMutableArray of these Video objects (off an XML stream) and display them to the user.
However, the Video should ONLY be persisted IF the user clicks 'Add to favorites'.
In the parsing method, I tried to create a Video object, and assign it the respective attributes. However, xCode would fail with this error (during video.title = xmlstream.title):
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Video setTitle:]: unrecognized selector sent to instance 0x70720d0'
Can someone please tell me how I can fix this to use the Video object regularly?