How to Get Path of MOMD File in Core Data
Asked Answered
G

1

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.

Gomorrah answered 5/1, 2011 at 2:24 Comment(0)
G
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.

Gomorrah answered 14/1, 2011 at 7:57 Comment(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 foundWalker

© 2022 - 2024 — McMap. All rights reserved.