1

Ey guys, I have seen this question and have used

self.managedObjectContent= [NSManagedObjectModel mergedModelFromBundles:nil];

in my code, however, I would like to be able to print a filepath via NSLog to console with the full path of the momd file. Problem is I don't know how to go about extracting the path to the MOMD resource using objective c, when I try logging managedObjectContent to console it ends up printing very lengthy arcane data that I don't even care about. So how would I go about getting only the path of the momd file? Sample code please! Thanks in advance.

Community
  • 1
  • 1
Stunner
  • 12,025
  • 12
  • 86
  • 145

1 Answers1

2

Solved the problem a little while ago by looking at what files were in my resources folder and realizing they are .mom files rather than .momd files. So searching for the resource with the .mom file extension solved my problem.

Stunner
  • 12,025
  • 12
  • 86
  • 145
  • 1
    How does this work with versioned models? I have a momd with two mom files in it, and I'm trying to get the mom for my version 2 but it can't be found – powerj1984 Oct 11 '13 at 21:13