if (_metaContextModel == nil) {
if (s_metadataModelRoot == nil)
{
NSString *modelPath = [[NSBundle mainBundle] pathForResource: @"MetaModel" ofType: @"momd"];
BOOL isDirectory;
if ([[NSFileManager defaultManager] fileExistsAtPath: modelPath isDirectory: &isDirectory]) {
if (isDirectory)
_metaContextModel = [NSManagedObjectModel modelWithContentsOfFile: [modelPath stringByAppendingPathComponent: @"MetaModel.mom"]]; ///My code is crashing in this line.
else
_metaContextModel = [NSManagedObjectModel modelWithContentsOfFile: modelPath];
}
NSManagedObjectModel could not read the MetaModel.mom from the path. The MetaModel.mom is present in the path but could not read it from the path. It is also present in my project folder. If I debug the code it is somewhat coming back from that line & not going forward, screen becoming black & no crash. I am using 64 bit architecture for my app & earlier in 32 bit architecture it was working good. Any help of finding out the reason will be valuable. Thank you.