I made an application without Core Data, and I decided to implement Core Data afterwards.
I created the entities inside the model, and created the files for these entities.
However, whenever I call any property for these properties, I get a runtime error saying that the selector could not be recognized.
This is the source for the managed object:
and this is the creation code:
Any ideas of what I might have missed or what I may be doing wrong?
I created the entities inside the model, and created the files for these entities.
However, whenever I call any property for these properties, I get a runtime error saying that the selector could not be recognized.
This is the source for the managed object:
Code:
@class CacheDB;
@interface CachedFile : NSManagedObject {
}
@property (nonatomic, retain) NSString * fileID;
@property (nonatomic, retain) NSString * filePath;
@property (nonatomic, retain) NSString * url;
@property (nonatomic, retain) NSDate * date;
@property (nonatomic, retain) CacheDB * database;
@end
@implementation CachedFile
@dynamic fileID;
@dynamic filePath;
@dynamic url;
@dynamic date;
@dynamic database;
@end
and this is the creation code:
Code:
CachedFile *newCachedFile = (CachedFile *)[NSEntityDescription entityForName:@"CachedFile" inManagedObjectContext:context];
newCachedFile.url = downloader.url; //program crashes here...
Any ideas of what I might have missed or what I may be doing wrong?