iPhone - Add Core Data To existing Project?

Viewed 8491

I am trying to add core data functionality to an existing project. I added a data model file named "myProj.xcdatamodel"

My code crashes in the following when getting the managedObjectModel What is the "momd" file? where can i get it or how can i create it? When i read the path it returns null and crashes the app.

NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"myProj" ofType:@"momd"];
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
2 Answers
Related